diff options
| author | diogo464 <[email protected]> | 2025-08-14 14:46:40 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-08-14 14:46:40 +0100 |
| commit | cf290372162b918c56d2c2e5ba67d7f448ad19ba (patch) | |
| tree | 9c0f5ff372173f553fc1b2aa6f81ed6b68415256 | |
| parent | eaca3e82a8ef701cb1a712548b20fa25ed64dde1 (diff) | |
feat: display user email next to logout button
When a user is logged in, their email address now appears to the left
of the logout button with proper spacing and styling.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
| -rw-r--r-- | frontend/components/auth/AuthButtons.tsx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/frontend/components/auth/AuthButtons.tsx b/frontend/components/auth/AuthButtons.tsx index 18ea13d..cfa69fe 100644 --- a/frontend/components/auth/AuthButtons.tsx +++ b/frontend/components/auth/AuthButtons.tsx | |||
| @@ -8,16 +8,19 @@ export async function AuthButtons() { | |||
| 8 | 8 | ||
| 9 | if (user.isLoggedIn) { | 9 | if (user.isLoggedIn) { |
| 10 | return ( | 10 | return ( |
| 11 | <form action="/logout" method="post"> | 11 | <div className="flex items-center gap-3"> |
| 12 | <Button type="submit" variant="outline"> | 12 | <span className="text-sm text-muted-foreground">{user.email}</span> |
| 13 | <LogOut className="mr-2 h-4 w-4" /> | 13 | <form action="/logout" method="post"> |
| 14 | Logout | 14 | <Button type="submit" variant="outline"> |
| 15 | </Button> | 15 | <LogOut className="mr-2 h-4 w-4" /> |
| 16 | </form> | 16 | Logout |
| 17 | </Button> | ||
| 18 | </form> | ||
| 19 | </div> | ||
| 17 | ) | 20 | ) |
| 18 | } | 21 | } |
| 19 | 22 | ||
| 20 | const authUrl = `${Auth_tinyauth_public_endpoint()}/auth/google` | 23 | const authUrl = `${Auth_tinyauth_public_endpoint()}/login` |
| 21 | 24 | ||
| 22 | return ( | 25 | return ( |
| 23 | <Button asChild> | 26 | <Button asChild> |
