File tree Expand file tree Collapse file tree 4 files changed +21
-5
lines changed
Expand file tree Collapse file tree 4 files changed +21
-5
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ function Circle() {
2727
2828export default function Home ( ) {
2929 const [ nextUrl , setNextUrl ] = useState ( "#" ) ;
30+ const [ isLoading , setIsLoading ] = useState ( false ) ;
3031
3132 useEffect ( ( ) => {
3233 const host = window . location . hostname ;
@@ -74,8 +75,15 @@ export default function Home() {
7475 < a
7576 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)]"
7677 href = { nextUrl }
78+ onClick = { ( e ) => {
79+ if ( isLoading ) {
80+ e . preventDefault ( ) ;
81+ } else {
82+ setIsLoading ( true ) ;
83+ }
84+ } }
7785 >
78- View Pull Request
86+ { isLoading ? 'Loading…' : ' View Pull Request' }
7987 </ a >
8088 < a
8189 className = "font-[family-name:var(--font-geist-sans)] text-secondary hover:underline flex items-center justify-center h-12 font-medium"
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ function Check() {
4747
4848export default function Home ( ) {
4949 const [ nextUrl , setNextUrl ] = useState ( "#" ) ;
50+ const [ isLoading , setIsLoading ] = useState ( false ) ;
5051
5152 useEffect ( ( ) => {
5253 const host = window . location . hostname ;
@@ -119,8 +120,15 @@ export default function Home() {
119120 < a
120121 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)]"
121122 href = { nextUrl }
123+ onClick = { ( e ) => {
124+ if ( isLoading ) {
125+ e . preventDefault ( ) ;
126+ } else {
127+ setIsLoading ( true ) ;
128+ }
129+ } }
122130 >
123- Push Commit and Merge Pull Request
131+ { isLoading ? 'Loading…' : ' Push Commit and Merge Pull Request' }
124132 </ a >
125133 < a
126134 className = "font-[family-name:var(--font-geist-sans)] text-secondary hover:underline flex items-center justify-center h-12 font-medium"
Original file line number Diff line number Diff line change 66 "branchName" : " main"
77 },
88 "target" : {
9- "templatePath" : " app/smaller-triangle/page .tsx" ,
9+ "templatePath" : " app/smaller-triangle.tsx" ,
1010 "branchName" : " vercel-bot-patch"
1111 },
1212 "path" : " app/page.tsx" ,
1717 "helpful-links" : {
1818 "type" : " commit-merge-comment" ,
1919 "base" : {
20- "templatePath" : " app/smaller-triangle/page .tsx" ,
20+ "templatePath" : " app/smaller-triangle.tsx" ,
2121 "branchName" : " vercel-bot-patch"
2222 },
2323 "target" : {
24- "templatePath" : " app/helpful-links/page .tsx" ,
24+ "templatePath" : " app/helpful-links.tsx" ,
2525 "branchName" : " vercel-bot-patch"
2626 },
2727 "path" : " app/page.tsx" ,
You can’t perform that action at this time.
0 commit comments