Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion vercel-tutor/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function Circle() {

export default function Home() {
const [nextUrl, setNextUrl] = useState("#");
const [isLoading, setIsLoading] = useState(false);

useEffect(() => {
const host = window.location.hostname;
Expand Down Expand Up @@ -74,8 +75,15 @@ export default function Home() {
<a
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground font-medium text-background hover:bg-[#383838] dark:hover:bg-[#ccc] h-12 font-[family-name:var(--font-geist-sans)]"
href={nextUrl}
onClick={(e) => {
if (isLoading) {
e.preventDefault();
} else {
setIsLoading(true);
}
}}
>
View Pull Request
{isLoading ? 'Loading…' : 'View Pull Request'}
</a>
<a
className="font-[family-name:var(--font-geist-sans)] text-secondary hover:underline flex items-center justify-center h-12 font-medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function Check() {

export default function Home() {
const [nextUrl, setNextUrl] = useState("#");
const [isLoading, setIsLoading] = useState(false);

useEffect(() => {
const host = window.location.hostname;
Expand Down Expand Up @@ -119,8 +120,15 @@ export default function Home() {
<a
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground font-medium text-background hover:bg-[#383838] dark:hover:bg-[#ccc] h-12 font-[family-name:var(--font-geist-sans)]"
href={nextUrl}
onClick={(e) => {
if (isLoading) {
e.preventDefault();
} else {
setIsLoading(true);
}
}}
>
Push Commit and Merge Pull Request
{isLoading ? 'Loading…' : 'Push Commit and Merge Pull Request'}
</a>
<a
className="font-[family-name:var(--font-geist-sans)] text-secondary hover:underline flex items-center justify-center h-12 font-medium"
Expand Down
6 changes: 3 additions & 3 deletions vercel-tutor/steps.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"branchName": "main"
},
"target": {
"templatePath": "app/smaller-triangle/page.tsx",
"templatePath": "app/smaller-triangle.tsx",
"branchName": "vercel-bot-patch"
},
"path": "app/page.tsx",
Expand All @@ -17,11 +17,11 @@
"helpful-links": {
"type": "commit-merge-comment",
"base": {
"templatePath": "app/smaller-triangle/page.tsx",
"templatePath": "app/smaller-triangle.tsx",
"branchName": "vercel-bot-patch"
},
"target": {
"templatePath": "app/helpful-links/page.tsx",
"templatePath": "app/helpful-links.tsx",
"branchName": "vercel-bot-patch"
},
"path": "app/page.tsx",
Expand Down