diff options
Diffstat (limited to 'frontend/components/auth/AuthButtons.tsx')
| -rw-r--r-- | frontend/components/auth/AuthButtons.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/frontend/components/auth/AuthButtons.tsx b/frontend/components/auth/AuthButtons.tsx index cfa69fe..474593d 100644 --- a/frontend/components/auth/AuthButtons.tsx +++ b/frontend/components/auth/AuthButtons.tsx | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | import { LogIn, LogOut } from "lucide-react" | 1 | import { LogIn, LogOut, Clock } from "lucide-react" |
| 2 | import { Button } from "@/components/ui/button" | 2 | import { Button } from "@/components/ui/button" |
| 3 | import { Auth_get_user } from "@/lib/auth" | 3 | import { Auth_get_user } from "@/lib/auth" |
| 4 | import { Auth_tinyauth_public_endpoint } from "@/lib/auth_shared" | 4 | import { Auth_tinyauth_public_endpoint } from "@/lib/auth_shared" |
| 5 | import Link from "next/link" | ||
| 5 | 6 | ||
| 6 | export async function AuthButtons() { | 7 | export async function AuthButtons() { |
| 7 | const user = await Auth_get_user() | 8 | const user = await Auth_get_user() |
| @@ -10,6 +11,12 @@ export async function AuthButtons() { | |||
| 10 | return ( | 11 | return ( |
| 11 | <div className="flex items-center gap-3"> | 12 | <div className="flex items-center gap-3"> |
| 12 | <span className="text-sm text-muted-foreground">{user.email}</span> | 13 | <span className="text-sm text-muted-foreground">{user.email}</span> |
| 14 | <Link href="/history"> | ||
| 15 | <Button variant="outline" size="sm"> | ||
| 16 | <Clock className="mr-2 h-4 w-4" /> | ||
| 17 | History | ||
| 18 | </Button> | ||
| 19 | </Link> | ||
| 13 | <form action="/logout" method="post"> | 20 | <form action="/logout" method="post"> |
| 14 | <Button type="submit" variant="outline"> | 21 | <Button type="submit" variant="outline"> |
| 15 | <LogOut className="mr-2 h-4 w-4" /> | 22 | <LogOut className="mr-2 h-4 w-4" /> |
