diff options
Diffstat (limited to 'frontend/components/auth')
| -rw-r--r-- | frontend/components/auth/AuthButtons.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/frontend/components/auth/AuthButtons.tsx b/frontend/components/auth/AuthButtons.tsx index 5b5053d..18ea13d 100644 --- a/frontend/components/auth/AuthButtons.tsx +++ b/frontend/components/auth/AuthButtons.tsx | |||
| @@ -5,10 +5,10 @@ import { Auth_tinyauth_public_endpoint } from "@/lib/auth_shared" | |||
| 5 | 5 | ||
| 6 | export async function AuthButtons() { | 6 | export async function AuthButtons() { |
| 7 | const user = await Auth_get_user() | 7 | const user = await Auth_get_user() |
| 8 | 8 | ||
| 9 | if (user.isLoggedIn) { | 9 | if (user.isLoggedIn) { |
| 10 | return ( | 10 | return ( |
| 11 | <form action="/api/logout" method="post"> | 11 | <form action="/logout" method="post"> |
| 12 | <Button type="submit" variant="outline"> | 12 | <Button type="submit" variant="outline"> |
| 13 | <LogOut className="mr-2 h-4 w-4" /> | 13 | <LogOut className="mr-2 h-4 w-4" /> |
| 14 | Logout | 14 | Logout |
| @@ -16,9 +16,9 @@ export async function AuthButtons() { | |||
| 16 | </form> | 16 | </form> |
| 17 | ) | 17 | ) |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | const authUrl = `${Auth_tinyauth_public_endpoint()}/auth/google` | 20 | const authUrl = `${Auth_tinyauth_public_endpoint()}/auth/google` |
| 21 | 21 | ||
| 22 | return ( | 22 | return ( |
| 23 | <Button asChild> | 23 | <Button asChild> |
| 24 | <a href={authUrl}> | 24 | <a href={authUrl}> |
| @@ -27,4 +27,4 @@ export async function AuthButtons() { | |||
| 27 | </a> | 27 | </a> |
| 28 | </Button> | 28 | </Button> |
| 29 | ) | 29 | ) |
| 30 | } \ No newline at end of file | 30 | } |
