11import { createFileRoute , Link } from '@tanstack/react-router'
2- import { useEffect , useState } from 'react'
2+
33import { Footer } from '~/components/Footer'
44import { LazySponsorSection } from '~/components/LazySponsorSection'
55import discordImage from '~/images/discord-logo-white.svg'
@@ -121,13 +121,6 @@ function Index() {
121121 const { recentPosts } = Route . useLoaderData ( ) as {
122122 recentPosts : BlogFrontMatter [ ]
123123 }
124- const [ showShip , setShowShip ] = useState ( false )
125-
126- useEffect ( ( ) => {
127- if ( Math . random ( ) < 0.02 ) {
128- setShowShip ( true )
129- }
130- } , [ ] )
131124
132125 return (
133126 < >
@@ -140,34 +133,30 @@ function Index() {
140133 xl:[--ship-x:80px] xl:[--ship-y:2.5rem]
141134 2xl:[--ship-x:90px] 2xl:[--ship-y:3rem]"
142135 >
143- { showShip && (
144- < >
145- { /* Ship behind splash */ }
146- < div className = "absolute left-1/3 bottom-[25%] z-0 animate-ship-peek" >
147- < NetlifyImage
148- src = "/images/ship.png"
149- alt = ""
150- width = { 80 }
151- height = { 80 }
152- className = "w-16 xl:w-20"
153- />
154- </ div >
155- { /* Invisible clickable ship in front */ }
156- < Link
157- to = "/explore"
158- className = "absolute left-1/3 bottom-[25%] z-20 animate-ship-peek-clickable"
159- title = "Explore TanStack"
160- >
161- < NetlifyImage
162- src = "/images/ship.png"
163- alt = "Explore TanStack"
164- width = { 80 }
165- height = { 80 }
166- className = "w-16 xl:w-20 opacity-0"
167- />
168- </ Link >
169- </ >
170- ) }
136+ { /* Ship behind splash */ }
137+ < div className = "absolute left-1/3 bottom-[25%] z-0 animate-ship-peek" >
138+ < NetlifyImage
139+ src = "/images/ship.png"
140+ alt = ""
141+ width = { 80 }
142+ height = { 80 }
143+ className = "w-16 xl:w-20"
144+ />
145+ </ div >
146+ { /* Invisible clickable ship in front */ }
147+ < Link
148+ to = "/explore"
149+ className = "absolute left-1/3 bottom-[25%] z-20 animate-ship-peek-clickable"
150+ title = "Explore TanStack"
151+ >
152+ < NetlifyImage
153+ src = "/images/ship.png"
154+ alt = "Explore TanStack"
155+ width = { 80 }
156+ height = { 80 }
157+ className = "w-16 xl:w-20 opacity-0"
158+ />
159+ </ Link >
171160 < BrandContextMenu className = "cursor-pointer relative z-10" >
172161 < NetlifyImage
173162 src = "/images/logos/splash-light.png"
0 commit comments