Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13 feat로그아웃 화면 구현 #15

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions app/logout/page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
'use client';
import React from 'react';
import { useRouter } from 'next/navigation';
import Title from '../../components/landing/Title';

const LogoutPage = () => {
const router = useRouter();

const handleLogout = () => {
if (confirm("Are you sure you want to log out?")) {
alert("Logout successful!");
// 로그아웃 로직 추가
router.push('/'); // 랜딩 페이지로 이동
}
};

return (
<div>
<Title />
<div className="p-5 max-w-md mx-auto text-center">
<div className="mb-20">
<p className="text-lg">Are you sure you want to log out?</p>
</div>
<div className="flex justify-center">
<button
type="button"
onClick={handleLogout}
className="px-4 py-2 bg-[#6DB1B2] text-white rounded transition duration-300 hover:bg-white hover:text-black hover:border-green-500 border-2 border-transparent"
>
Log Out
</button>
</div>
</div>
</div>
);
};

export default LogoutPage;
Loading