From 422605f7a62ae3d32573387ab45e739b497357c6 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Tue, 30 Jul 2024 23:47:29 +0900
Subject: feat(frontend): implement /logout

---
 frontend/app/routes/dashboard.tsx | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

(limited to 'frontend/app/routes/dashboard.tsx')

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>
   );
-- 
cgit v1.3.1

