-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from TEAM-CLIP/12-analytics
feat: va 측정 위한 인스타그램 연결 페이지 추가
- Loading branch information
Showing
4 changed files
with
107 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
'use client'; | ||
|
||
import { useEffect } from 'react'; | ||
import { useRouter } from 'next/navigation'; | ||
import Image from 'next/image'; | ||
import Logo from '@/data/logo.svg'; | ||
|
||
export default function InstagramRedirectPage() { | ||
const router = useRouter(); | ||
let instagramId: string | null = null; | ||
|
||
if (typeof window !== 'undefined') { | ||
const searchParams = new URLSearchParams(window.location.search); | ||
instagramId = searchParams.get('id'); | ||
} | ||
|
||
useEffect(() => { | ||
console.log(instagramId); | ||
if (instagramId) { | ||
window.location.href = `https://www.instagram.com/${instagramId}`; | ||
} else { | ||
router.push('/photographer'); // instagramId이 없으면 다시 입력 페이지로 이동 | ||
} | ||
}, []); | ||
|
||
return ( | ||
<div className="flex flex-col items-center justify-center min-h-screen bg-gray-100"> | ||
<div className="flex flex-col items-center justify-center"> | ||
<Image | ||
src={Logo} | ||
alt="linking to instagram" | ||
width={100} | ||
height={100} | ||
className="mb-4" | ||
/> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters