mirror of
https://github.com/dyzulk/dyzulk.github.io.git
synced 2026-01-26 05:45:28 +07:00
25 lines
585 B
TypeScript
25 lines
585 B
TypeScript
import { supabase } from '@/lib/supabase'
|
|
import { useNavigate } from 'react-router-dom'
|
|
|
|
export default function Dashboard() {
|
|
const navigate = useNavigate()
|
|
|
|
const handleLogout = async () => {
|
|
await supabase.auth.signOut()
|
|
navigate('/')
|
|
}
|
|
|
|
return (
|
|
<div className="p-8">
|
|
<h1 className="text-3xl font-bold mb-4">Admin Dashboard</h1>
|
|
<p className="mb-4">Welcome, Admin!</p>
|
|
<button
|
|
onClick={handleLogout}
|
|
className="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600"
|
|
>
|
|
Logout
|
|
</button>
|
|
</div>
|
|
)
|
|
}
|