From 519379effa7a4d6aef02ee5e9a2fd2b3a9be7cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=8C=E1=85=A2=E1=84=92=E1=85=A1?= Date: Sun, 22 Oct 2023 02:32:47 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=A9=94=EC=9D=B8=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=B0=B0=EB=84=88=20=ED=81=B4=EB=A6=AD=EC=8B=9C=20?= =?UTF-8?q?=EC=98=A8=EB=B3=B4=EB=94=A9=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20=EB=A1=9C=EC=A7=81=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/main/components/Banner.tsx | 27 +++++++------------ .../jurumarble/src/components/AuthProcess.tsx | 12 +++++++++ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/apps/jurumarble/src/app/main/components/Banner.tsx b/apps/jurumarble/src/app/main/components/Banner.tsx index 71ca8a0e..f3010fff 100644 --- a/apps/jurumarble/src/app/main/components/Banner.tsx +++ b/apps/jurumarble/src/app/main/components/Banner.tsx @@ -1,31 +1,22 @@ 'use client'; -import { useEffect } from 'react'; - import Path from 'lib/Path'; -import userStorage from 'lib/utils/userStorage'; import Image from 'next/image'; -import { useRouter } from 'next/navigation'; +import Link from 'next/link'; import { mainBanner } from 'public/images'; import styled from 'styled-components'; function Banner() { - const router = useRouter(); - useEffect(() => { - if (!userStorage.get() || !!localStorage.getItem('visited_home')) { - return; - } - router.push(Path.ONBOARDING_PAGE); - localStorage.setItem('visited_home', 'false'); - }, []); return ( - 배너 + + 배너 + ); } diff --git a/apps/jurumarble/src/components/AuthProcess.tsx b/apps/jurumarble/src/components/AuthProcess.tsx index 2d3ac4d4..16f58ebc 100644 --- a/apps/jurumarble/src/components/AuthProcess.tsx +++ b/apps/jurumarble/src/components/AuthProcess.tsx @@ -67,6 +67,18 @@ function AuthProcess() { } }, [pathname, router]); + /** + * 온보딩 페이지로 이동 로직 + * @TODO 분리 필요 + */ + useEffect(() => { + if (!isLogin() || !!localStorage.getItem('visited_home')) { + return; + } + router.push(Path.ONBOARDING_PAGE); + localStorage.setItem('visited_home', 'false'); + }, [router]); + return <>; }