@@ -9,6 +9,22 @@ import { cn } from '@/shared/lib';
99const MainSection = ( ) => {
1010 const { ref, activeIndex } = useSequentialFadeIn ( 2 , 300 ) ;
1111
12+ const handleMobileDownload = ( ) => {
13+ if ( typeof navigator === 'undefined' ) {
14+ window . location . href = 'https://tuk.kr' ;
15+ return ;
16+ }
17+
18+ const ua = navigator . userAgent . toLowerCase ( ) ;
19+ const isAndroid = ua . includes ( 'android' ) ;
20+
21+ if ( isAndroid ) {
22+ window . location . href = 'https://play.google.com/store/apps/details?id=com.plottwist.tuk' ;
23+ } else {
24+ window . location . href = 'https://tuk.kr' ;
25+ }
26+ } ;
27+
1228 return (
1329 < section
1430 id = "thumbnail"
@@ -50,14 +66,14 @@ const MainSection = () => {
5066 >
5167 < div className = "flex gap-3 max-[880px]:hidden" >
5268 < Link
53- href = "/ "
69+ href = "# "
5470 className = "flex h-[3.625rem] w-[10.75rem] cursor-pointer items-center justify-center gap-2 rounded-xl border-[1.5px] border-white-default/20 bg-black-default/30 text-sm font-bold text-white-default"
5571 >
5672 < Image src = "/app-store.webp" alt = "App Store" width = { 24 } height = { 24 } priority />
5773 App Store
5874 </ Link >
5975 < Link
60- href = "/ "
76+ href = "https://play.google.com/store/apps/details?id=com.plottwist.tuk "
6177 className = "flex h-[3.625rem] w-[10.75rem] cursor-pointer items-center justify-center gap-2 rounded-xl border-[1.5px] border-white-default/20 bg-black-default/30 text-sm font-bold text-white-default"
6278 >
6379 < Image src = "/play-store.webp" alt = "Google Play" width = { 24 } height = { 24 } priority />
@@ -66,12 +82,13 @@ const MainSection = () => {
6682 </ div >
6783
6884 < div className = "mb-[85px] min-[881px]:hidden" >
69- < Link
70- href = "/"
85+ < button
86+ type = "button"
87+ onClick = { handleMobileDownload }
7188 className = "flex h-[52px] w-[153px] cursor-pointer items-center justify-center rounded-[36px] bg-white-default text-center font-bold text-[rgba(58,58,58,0.9)]"
7289 >
7390 앱 다운로드
74- </ Link >
91+ </ button >
7592 </ div >
7693 </ div >
7794 </ div >
0 commit comments