Remove the Admin Dashboard button from the auction screen
Removes the conditional rendering of the "Admin Dashboard" button in the Auctions page component when the user is authenticated and their role is 'admin' or 'superadmin'. 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/9tQ591o
This commit is contained in:
@ -186,23 +186,13 @@ export default function Auctions() {
|
||||
</Link>
|
||||
|
||||
{isAuthenticated && user ? (
|
||||
<>
|
||||
{(user.role === 'admin' || user.role === 'superadmin') && (
|
||||
<Link href="/admin">
|
||||
<Button variant="ghost" size="sm">
|
||||
Admin Dashboard
|
||||
</Button>
|
||||
</Link>
|
||||
)}
|
||||
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => window.location.href = "/api/logout"}
|
||||
>
|
||||
Logout
|
||||
</Button>
|
||||
</>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => window.location.href = "/api/logout"}
|
||||
>
|
||||
Logout
|
||||
</Button>
|
||||
) : (
|
||||
<Button size="sm" onClick={() => window.location.href = "/api/login"}>
|
||||
Login
|
||||
|
||||
Reference in New Issue
Block a user