Organize logout button within user profile dropdown menu

Refactors the Home page UI to integrate the logout button into a user profile dropdown menu, improving navigation and user experience.

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:
kimjaehyeon0101
2025-09-29 22:14:18 +00:00
parent b9b5733c05
commit 980ba92b07

View File

@ -144,21 +144,28 @@ export default function Home() {
Admin Dashboard Admin Dashboard
</Button> </Button>
<div className="flex items-center space-x-2 px-3 py-1 bg-gray-100 rounded-md"> <DropdownMenu>
<DropdownMenuTrigger asChild>
<div className="flex items-center space-x-2 px-3 py-1 bg-gray-100 rounded-md cursor-pointer hover:bg-gray-200 transition-colors" data-testid="user-profile-chip">
<User className="h-4 w-4 text-gray-600" /> <User className="h-4 w-4 text-gray-600" />
<span className="text-sm font-medium text-gray-700" data-testid="user-name"> <span className="text-sm font-medium text-gray-700" data-testid="user-name">
{user.firstName} {user.lastName} {user.firstName} {user.lastName}
</span> </span>
</div> </div>
</DropdownMenuTrigger>
<Button <DropdownMenuContent align="end" className="w-48">
variant="ghost" <DropdownMenuLabel>My Account</DropdownMenuLabel>
size="sm" <DropdownMenuSeparator />
<DropdownMenuItem
onClick={handleLogout} onClick={handleLogout}
className="cursor-pointer text-red-600"
data-testid="button-logout" data-testid="button-logout"
> >
<LogOut className="h-4 w-4" /> <LogOut className="h-4 w-4 mr-2" />
</Button> Logout
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</> </>
) : ( ) : (
<Button <Button