summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-08-13 16:59:38 +0100
committerdiogo464 <[email protected]>2025-08-13 16:59:38 +0100
commitf9d8b206c0bb6af8c2d4aa619ee3b9859073f901 (patch)
tree12a4f9d9f44458e903f4a484f9c75f9b6b60f47c /frontend
parent0a588ec2d7417b12b53a8cc816a399a09d3a0814 (diff)
fix: update logout form action to use /logout endpoint
Change logout form action from /api/logout to /logout and clean up formatting. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Diffstat (limited to 'frontend')
-rw-r--r--frontend/components/auth/AuthButtons.tsx10
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
6export async function AuthButtons() { 6export 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}