diff options
Diffstat (limited to 'frontend/components')
| -rw-r--r-- | frontend/components/auth/AuthButtons.tsx | 9 | ||||
| -rw-r--r-- | frontend/components/drive/DriveHeader.tsx | 14 |
2 files changed, 10 insertions, 13 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" /> |
diff --git a/frontend/components/drive/DriveHeader.tsx b/frontend/components/drive/DriveHeader.tsx index 76b0e40..718d031 100644 --- a/frontend/components/drive/DriveHeader.tsx +++ b/frontend/components/drive/DriveHeader.tsx | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | import { HardDrive, Clock } from "lucide-react" | 1 | import { HardDrive } from "lucide-react" |
| 2 | import { AuthButtons } from "@/components/auth/AuthButtons" | 2 | import { AuthButtons } from "@/components/auth/AuthButtons" |
| 3 | import Link from "next/link" | ||
| 4 | import { Button } from "@/components/ui/button" | ||
| 5 | 3 | ||
| 6 | export async function DriveHeader() { | 4 | export async function DriveHeader() { |
| 7 | return ( | 5 | return ( |
| @@ -11,15 +9,7 @@ export async function DriveHeader() { | |||
| 11 | <h1 className="text-2xl font-bold">FCT Drive</h1> | 9 | <h1 className="text-2xl font-bold">FCT Drive</h1> |
| 12 | </div> | 10 | </div> |
| 13 | 11 | ||
| 14 | <div className="flex items-center gap-2"> | 12 | <AuthButtons /> |
| 15 | <Link href="/history"> | ||
| 16 | <Button variant="outline" size="sm"> | ||
| 17 | <Clock className="mr-2 h-4 w-4" /> | ||
| 18 | History | ||
| 19 | </Button> | ||
| 20 | </Link> | ||
| 21 | <AuthButtons /> | ||
| 22 | </div> | ||
| 23 | </div> | 13 | </div> |
| 24 | ) | 14 | ) |
| 25 | } \ No newline at end of file | 15 | } \ No newline at end of file |
