Skip to content

Commit dee5123

Browse files
authored
Merge pull request #70 from Nexters/feat/landing-page-app-store-link
feat: footer 앱 다운로드 링크 추가
2 parents 2635541 + d59d3d2 commit dee5123

File tree

1 file changed

+21
-3
lines changed
  • apps/tuk-landing/src/app/(home)/src/components

1 file changed

+21
-3
lines changed

apps/tuk-landing/src/app/(home)/src/components/Footer.tsx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,26 @@ import { useEffect, useRef, useState } from 'react';
66

77
const Footer = () => {
88
const footerRef = useRef<HTMLDivElement | null>(null);
9+
910
const [inView, setInView] = useState(false);
1011

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 =
25+
'https://apps.apple.com/kr/app/%ED%88%AD-%EB%A7%8C%EB%82%A8%EC%9D%84-%EB%84%8C%EC%A7%80%EC%8B%9C/id6749781762';
26+
}
27+
};
28+
1129
useEffect(() => {
1230
if (!footerRef.current) return;
1331

@@ -66,12 +84,12 @@ const Footer = () => {
6684
</div>
6785

6886
<div className="min-[881px]:hidden">
69-
<Link
70-
href="/"
87+
<button
88+
onClick={handleMobileDownload}
7189
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)]"
7290
>
7391
앱 다운로드
74-
</Link>
92+
</button>
7593
</div>
7694
</div>
7795
</div>

0 commit comments

Comments
 (0)