@@ -66,8 +66,6 @@ const dialogueArray: Array<string> = [
6666
6767export default function Home ( ) {
6868 function removeMyGithubYeaaaaaaa ( ) {
69- if ( ! githubButtonRef . current ) return ;
70-
7169 if ( removedGithub ) {
7270 if ( dialogueArray . indexOf ( currentDialogue ) == dialogueArray . length - 1 ) {
7371 open ( "https://store.steampowered.com/app/2159370/Click_For_Points/" ) ;
@@ -80,11 +78,10 @@ export default function Home() {
8078 return ;
8179 }
8280
83- setIsRemovingGithub ( true ) ;
81+ setRemovedGithub ( true ) ;
8482 }
8583
8684 const githubButtonRef = useRef < HTMLButtonElement > ( null ) ;
87- const [ isRemovingGithub , setIsRemovingGithub ] = useState < boolean > ( false ) ;
8885 const [ removedGithub , setRemovedGithub ] = useState < boolean > ( false ) ;
8986
9087 const [ currentSplash , setCurrentSplash ] = useState < string > ( " " ) ; // Invisible character because idk man i hate next.js
@@ -111,17 +108,31 @@ export default function Home() {
111108 </ h2 >
112109 < br />
113110 < div className = "flex items-center gap-5 w-[50vw]" >
114- < button
115- onAnimationEnd = { ( ) => {
116- setRemovedGithub ( true ) ;
117- setCurrentDialogue ( dialogueArray [ 1 ] ) ; // Call this here just for next dialogue
118- } }
119- className = { `rounded-full bg-primary w-dvw p-2 ${ isRemovingGithub && "slump-animation" } ` }
120- ref = { githubButtonRef }
121- onClick = { ( ) => open ( "https://github.com/Precontation" ) }
122- >
123- View my GitHub
124- </ button >
111+ { removedGithub ? (
112+ < button
113+ onAnimationEnd = { ( ) => {
114+ setRemovedGithub ( true ) ;
115+ setCurrentDialogue ( dialogueArray [ 1 ] ) ; // Call this here just for next dialogue
116+ } }
117+ className = "rounded-full bg-primary w-dvw p-2 slump-animation"
118+ tabIndex = { - 1 }
119+ >
120+ View my GitHub
121+ </ button >
122+ ) : (
123+ < button
124+ onAnimationEnd = { ( ) => {
125+ setRemovedGithub ( true ) ;
126+ setCurrentDialogue ( dialogueArray [ 1 ] ) ; // Call this here just for next dialogue
127+ } }
128+ className = "rounded-full bg-primary w-dvw p-2"
129+ ref = { githubButtonRef }
130+ onClick = { ( ) => open ( "https://github.com/Precontation" ) }
131+ >
132+ View my GitHub
133+ </ button >
134+ ) }
135+
125136 < button
126137 className = "rounded-full bg-primary w-dvw p-2"
127138 onClick = { removeMyGithubYeaaaaaaa }
0 commit comments