From 18308a22879dc9143a03bcbe53cf0c5e8e49ee1f Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sat, 27 Jul 2024 01:17:37 +0900
Subject: remix

---
 frontend/src/routes/Login.tsx | 36 ------------------------------------
 1 file changed, 36 deletions(-)
 delete mode 100644 frontend/src/routes/Login.tsx

(limited to 'frontend/src/routes/Login.tsx')

diff --git a/frontend/src/routes/Login.tsx b/frontend/src/routes/Login.tsx
deleted file mode 100644
index 4871060..0000000
--- a/frontend/src/routes/Login.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import { redirect, Form, ActionFunctionArgs } from "react-router-dom";
-
-export default function Login() {
-  return (
-    <div>
-      <h1>Albatross.swift</h1>
-      <h2>Login</h2>
-      <Form method="post">
-        <label>Username</label>
-        <input type="text" name="username" />
-        <label>Password</label>
-        <input type="password" name="password" />
-        <button type="submit">Login</button>
-      </Form>
-    </div>
-  );
-}
-
-export async function loginAction({ request }: ActionFunctionArgs) {
-  const formData = await request.formData();
-  const username = formData.get("username");
-  const password = formData.get("password");
-
-  const res = await fetch("/api/login", {
-    method: "POST",
-    headers: {
-      "Content-Type": "application/json",
-    },
-    body: JSON.stringify({ username, password }),
-  });
-  if (!res.ok) {
-    throw res;
-  }
-  const { userId } = await res.json();
-  return redirect(`/users/${userId}/`);
-}
-- 
cgit v1.3.1

