mirror of
https://github.com/dyzulk/dyzulk.github.io.git
synced 2026-01-26 05:45:28 +07:00
Initial commit for dyzulk.github.io
This commit is contained in:
24
src/pages/admin/Dashboard.tsx
Normal file
24
src/pages/admin/Dashboard.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user