Allow super administrators to access the admin dashboard
Update `AdminDashboard.tsx` to include 'superadmin' role for access. Modify `Home.tsx` to navigate to '/admin' when the admin button is clicked. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 069d4324-6c40-4355-955e-c714a50de1ea Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/069d4324-6c40-4355-955e-c714a50de1ea/LZrXNFV
This commit is contained in:
@ -11,6 +11,10 @@ export default function Home() {
|
||||
window.location.href = "/api/logout";
|
||||
};
|
||||
|
||||
const handleAdminPage = () => {
|
||||
window.location.href = "/admin";
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
{/* Header */}
|
||||
@ -41,7 +45,7 @@ export default function Home() {
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={handleLogout}
|
||||
onClick={handleAdminPage}
|
||||
data-testid="button-admin"
|
||||
>
|
||||
관리자 페이지
|
||||
|
||||
Reference in New Issue
Block a user