diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-09 23:30:39 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-09 23:30:39 +0900 |
| commit | 41e98f3b0a936f7982434b74a88b919b99fd94ce (patch) | |
| tree | 72e1a3cc00044f9c00dc5f22ef9325124f272401 /frontend/app/routes | |
| parent | 93f2ffc18d1d86bd2999533e8d904c92cb29bc1a (diff) | |
| parent | af36c59851399194bcbb77a3093d46c2757cb7b4 (diff) | |
| download | phperkaigi-2025-albatross-41e98f3b0a936f7982434b74a88b919b99fd94ce.tar.gz phperkaigi-2025-albatross-41e98f3b0a936f7982434b74a88b919b99fd94ce.tar.zst phperkaigi-2025-albatross-41e98f3b0a936f7982434b74a88b919b99fd94ce.zip | |
Merge branch 'feat/auth-fortee'
Diffstat (limited to 'frontend/app/routes')
| -rw-r--r-- | frontend/app/routes/login.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/frontend/app/routes/login.tsx b/frontend/app/routes/login.tsx index dc87d47..d6414f7 100644 --- a/frontend/app/routes/login.tsx +++ b/frontend/app/routes/login.tsx @@ -3,7 +3,7 @@ import type { LoaderFunctionArgs, MetaFunction, } from "@remix-run/node"; -import { Form } from "@remix-run/react"; +import { Form, useLocation } from "@remix-run/react"; import { ensureUserNotLoggedIn, login } from "../.server/auth"; export const meta: MetaFunction = () => [ @@ -20,6 +20,10 @@ export async function action({ request }: ActionFunctionArgs) { } export default function Login() { + const location = useLocation(); + const searchParams = new URLSearchParams(location.search); + const registrationToken = searchParams.get("registration_token"); + return ( <div className="min-h-screen bg-gray-100 flex items-center justify-center"> <Form @@ -58,6 +62,11 @@ export default function Login() { 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> + <input + type="hidden" + name="registration_token" + value={registrationToken ?? ""} + /> <button type="submit" className="w-full bg-blue-500 text-white py-2 rounded hover:bg-blue-600 transition duration-300" |
