Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions apps/tuk-landing/src/app/(home)/src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,26 @@ import { useEffect, useRef, useState } from 'react';

const Footer = () => {
const footerRef = useRef<HTMLDivElement | null>(null);

const [inView, setInView] = useState(false);

const handleMobileDownload = () => {
if (typeof navigator === 'undefined') {
window.location.href = 'https://tuk.kr';
return;
}

const ua = navigator.userAgent.toLowerCase();
const isAndroid = ua.includes('android');

if (isAndroid) {
window.location.href = 'https://play.google.com/store/apps/details?id=com.plottwist.tuk';
} else {
window.location.href =
'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';
}
};

useEffect(() => {
if (!footerRef.current) return;

Expand Down Expand Up @@ -66,12 +84,12 @@ const Footer = () => {
</div>

<div className="min-[881px]:hidden">
<Link
href="/"
<button
onClick={handleMobileDownload}
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)]"
>
앱 다운로드
</Link>
</button>
</div>
</div>
</div>
Expand Down
Loading