Skip to content

Commit

Permalink
feat: Add android app link
Browse files Browse the repository at this point in the history
  • Loading branch information
Najeong-Kim committed Aug 24, 2024
1 parent 0d49520 commit 73f3a50
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
13 changes: 5 additions & 8 deletions src/app/(web)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import Image from 'next/image';
import Link from 'next/link';
import { GoogleAnalytics } from 'nextjs-google-analytics';
import { useCallback } from 'react';
import { toast } from 'sonner';
import left from '@public/downloads/left.png';
import android from '@public/downloads/right-android.png';
import ios from '@public/downloads/right-ios.png';
Expand All @@ -13,10 +11,6 @@ import { cn } from '@/shared/lib';
import { SnowConfetti } from '@/shared/ui/snow-confetti';

export default function Layout({ children }: { children: React.ReactNode }) {
const handleAndroid = useCallback(() => {
toast.error('준비중입니다.');
}, []);

return (
<>
<GoogleAnalytics trackPageViews />
Expand Down Expand Up @@ -49,9 +43,12 @@ export default function Layout({ children }: { children: React.ReactNode }) {
>
<Image src={ios} alt="ios" width={95} draggable={false} />
</Link>
<button onClick={handleAndroid}>
<Link
href="https://play.google.com/store/apps/details?id=com.dieski.weski"
target="_blank"
>
<Image src={android} alt="android" width={95} draggable={false} />
</button>
</Link>
</div>
</div>
</div>
Expand Down
17 changes: 7 additions & 10 deletions src/features/discovery-detail/ui/app-download-dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Image from 'next/image';
import Link from 'next/link';
import { useCallback } from 'react';
import { toast } from 'sonner';
import logo from '@public/assets/logo.svg';
import snow from '@public/assets/snow.png';
import android from '@public/downloads/android.png';
Expand All @@ -14,11 +12,7 @@ interface AppDownloadDialogProps {
onClose: () => void;
}

const AppDownloadDialog = ({ className, onClose }: AppDownloadDialogProps) => {
const handleAndroid = useCallback(() => {
toast.error('준비중입니다.');
}, []);

const AppDownloadDialog = ({ className, onClose }: AppDownloadDialogProps) => {
return (
<div
className={cn(
Expand All @@ -43,10 +37,13 @@ const AppDownloadDialog = ({ className, onClose }: AppDownloadDialogProps) => {
>
<Image src={ios} alt="ios" draggable={false} />
</Link>
<button onClick={handleAndroid}>
<Link
href="https://play.google.com/store/apps/details?id=com.dieski.weski"
target="_blank"
>
<Image src={android} alt="android" draggable={false} />
</button>
</div>
</Link>
</div>
</div>
);
};
Expand Down

0 comments on commit 73f3a50

Please sign in to comment.