@@ -6,6 +6,7 @@ import Link from "next/link";
66import { checkUserStatus , getStock } from "@/services/userStock-service" ;
77import { useAuthStore } from "@/stores/authStore" ;
88import Image from "next/image" ;
9+ import { TutorialOverlay } from "../blocks/Tutorial/TutorialPopup.client" ;
910
1011const menuItems = [
1112 { label : "홈" , href : "/" } ,
@@ -21,6 +22,11 @@ export default function Navbar() {
2122 const auth = useAuthStore ( ( s ) => s . auth ) ;
2223 const clearAuth = useAuthStore ( ( s ) => s . clearAuth ) ;
2324 const loginRequiredPaths = [ "/" , "/practice" , "/ranking" , "/mypage" ] ;
25+ const [ showTutorial , setShowTutorial ] = useState ( false ) ;
26+ const handleCloseTutorial = ( ) => {
27+ localStorage . setItem ( "hideTutorial" , "true" ) ;
28+ setShowTutorial ( false ) ;
29+ } ;
2430
2531 // hydration mismatch 방지용
2632 const [ mounted , setMounted ] = useState ( false ) ;
@@ -162,9 +168,17 @@ export default function Navbar() {
162168 } ) }
163169 </ ul >
164170
165- { /* 로그인/로그아웃 버튼 */ }
171+ { /* 튜토리얼, 로그인/로그아웃 버튼 */ }
166172
167173 < div className = "ml-auto pr-5" >
174+ < button
175+ onClick = { ( ) => {
176+ setShowTutorial ( true ) ;
177+ } }
178+ className = "text-sm px-4 text-[#E2E2E2] hover:text-white"
179+ >
180+ 튜토리얼
181+ </ button >
168182 { mounted ? (
169183 auth ?. token ? (
170184 < button
@@ -186,6 +200,7 @@ export default function Navbar() {
186200 < div className = "w-[64px] h-[20px]" />
187201 ) }
188202 </ div >
203+ { showTutorial && < TutorialOverlay onClose = { handleCloseTutorial } /> }
189204 </ nav >
190205 ) ;
191206}
0 commit comments