aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/routes/login.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-01 22:22:12 +0900
committernsfisis <nsfisis@gmail.com>2024-08-01 22:22:12 +0900
commit8f2cceacc8fde328033de7f05bb12e7b1246dd86 (patch)
treeacb93a52454315c286b9e0f3c624ae1bbcfa32f5 /frontend/app/routes/login.tsx
parent00e50b2dcfed209669c46da54dc07905d65887b8 (diff)
downloadphperkaigi-2025-albatross-8f2cceacc8fde328033de7f05bb12e7b1246dd86.tar.gz
phperkaigi-2025-albatross-8f2cceacc8fde328033de7f05bb12e7b1246dd86.tar.zst
phperkaigi-2025-albatross-8f2cceacc8fde328033de7f05bb12e7b1246dd86.zip
chore(frontend): [biome] format
Diffstat (limited to 'frontend/app/routes/login.tsx')
-rw-r--r--frontend/app/routes/login.tsx116
1 files changed, 58 insertions, 58 deletions
diff --git a/frontend/app/routes/login.tsx b/frontend/app/routes/login.tsx
index f63df08..95effaa 100644
--- a/frontend/app/routes/login.tsx
+++ b/frontend/app/routes/login.tsx
@@ -1,74 +1,74 @@
import type {
- ActionFunctionArgs,
- LoaderFunctionArgs,
- MetaFunction,
+ ActionFunctionArgs,
+ LoaderFunctionArgs,
+ MetaFunction,
} from "@remix-run/node";
import { Form } from "@remix-run/react";
import { authenticator } from "../.server/auth";
export const meta: MetaFunction = () => {
- return [{ title: "Login | iOSDC Japan 2024 Albatross.swift" }];
+ return [{ title: "Login | iOSDC Japan 2024 Albatross.swift" }];
};
export async function loader({ request }: LoaderFunctionArgs) {
- return await authenticator.isAuthenticated(request, {
- successRedirect: "/dashboard",
- });
+ return await authenticator.isAuthenticated(request, {
+ successRedirect: "/dashboard",
+ });
}
export async function action({ request }: ActionFunctionArgs) {
- return await authenticator.authenticate("default", request, {
- successRedirect: "/dashboard",
- failureRedirect: "/login",
- });
+ return await authenticator.authenticate("default", request, {
+ successRedirect: "/dashboard",
+ failureRedirect: "/login",
+ });
}
export default function Login() {
- return (
- <div className="min-h-screen bg-gray-100 flex items-center justify-center">
- <Form
- method="post"
- className="bg-white p-8 rounded shadow-md w-full max-w-sm"
- >
- <h2 className="text-2xl font-bold mb-6 text-center">Login</h2>
- <div className="mb-4">
- <label
- htmlFor="username"
- className="block text-sm font-medium text-gray-700"
- >
- Username
- </label>
- <input
- type="text"
- name="username"
- id="username"
- required
- className="mt-1 p-2 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500"
- />
- </div>
- <div className="mb-6">
- <label
- htmlFor="password"
- className="block text-sm font-medium text-gray-700"
- >
- Password
- </label>
- <input
- type="password"
- name="password"
- id="password"
- autoComplete="current-password"
- required
- className="mt-1 p-2 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500"
- />
- </div>
- <button
- type="submit"
- className="w-full bg-blue-500 text-white py-2 rounded hover:bg-blue-600 transition duration-300"
- >
- Log In
- </button>
- </Form>
- </div>
- );
+ return (
+ <div className="min-h-screen bg-gray-100 flex items-center justify-center">
+ <Form
+ method="post"
+ className="bg-white p-8 rounded shadow-md w-full max-w-sm"
+ >
+ <h2 className="text-2xl font-bold mb-6 text-center">Login</h2>
+ <div className="mb-4">
+ <label
+ htmlFor="username"
+ className="block text-sm font-medium text-gray-700"
+ >
+ Username
+ </label>
+ <input
+ type="text"
+ name="username"
+ id="username"
+ required
+ className="mt-1 p-2 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500"
+ />
+ </div>
+ <div className="mb-6">
+ <label
+ htmlFor="password"
+ className="block text-sm font-medium text-gray-700"
+ >
+ Password
+ </label>
+ <input
+ type="password"
+ name="password"
+ id="password"
+ autoComplete="current-password"
+ required
+ className="mt-1 p-2 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500"
+ />
+ </div>
+ <button
+ type="submit"
+ className="w-full bg-blue-500 text-white py-2 rounded hover:bg-blue-600 transition duration-300"
+ >
+ Log In
+ </button>
+ </Form>
+ </div>
+ );
}