diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-30 23:47:29 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-30 23:47:29 +0900 |
| commit | 422605f7a62ae3d32573387ab45e739b497357c6 (patch) | |
| tree | 72534a499914f492a26c246930159a8d4ae532f1 /frontend/app/routes/dashboard.tsx | |
| parent | db0721e9820f399727b933088a276184e9565c9d (diff) | |
| download | phperkaigi-2025-albatross-422605f7a62ae3d32573387ab45e739b497357c6.tar.gz phperkaigi-2025-albatross-422605f7a62ae3d32573387ab45e739b497357c6.tar.zst phperkaigi-2025-albatross-422605f7a62ae3d32573387ab45e739b497357c6.zip | |
feat(frontend): implement /logout
Diffstat (limited to 'frontend/app/routes/dashboard.tsx')
| -rw-r--r-- | frontend/app/routes/dashboard.tsx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx index d7cad6c..9afee86 100644 --- a/frontend/app/routes/dashboard.tsx +++ b/frontend/app/routes/dashboard.tsx @@ -1,5 +1,5 @@ import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node"; -import { Link, useLoaderData } from "@remix-run/react"; +import { Link, useLoaderData, Form } from "@remix-run/react"; import { isAuthenticated } from "../.server/auth"; import { apiClient } from "../.server/api/client"; @@ -68,6 +68,16 @@ export default function Dashboard() { ))} </ul> </div> + <div> + <Form method="post" action="/logout"> + <button + className="mt-6 px-6 py-2 text-white bg-red-500 hover:bg-red-700 rounded" + type="submit" + > + Logout + </button> + </Form> + </div> </div> </div> ); |
