- Get started by editing
- src/app/page.tsx
-
- Docs{" "} - - -> - -
-- Find in-depth information about Next.js features and API. -
- + const handleLogout = async () => { + try { + await axios.post( + `${process.env.NEXT_PUBLIC_API_BASE_URL}/logout`, + {}, + { withCredentials: true }, + ); + setProfile(null); + window.location.href = `${process.env.NEXT_PUBLIC_BASE_URL}`; // 로그아웃 후 메인 페이지로 이동 + } catch (error) { + console.error("Error logging out", error); + } + }; - -- Learn{" "} - - -> - -
-- Learn about Next.js in an interactive course with quizzes! -
- + const handleLoginRedirect = () => { + window.location.href = `${process.env.NEXT_PUBLIC_BASE_URL}/login`; // 로그인 페이지로 이동 + }; - -- Templates{" "} - - -> - -
-- Explore starter templates for Next.js. -
- + console.log(`${process.env.NEXT_PUBLIC_API_BASE_URL}/users`); - -- Deploy{" "} - - -> - -
-- Instantly deploy your Next.js site to a shareable URL with Vercel. -
- -