remixed v0
This commit is contained in:
13
app/routes/__auth/forgot-password.tsx
Normal file
13
app/routes/__auth/forgot-password.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import type { MetaFunction } from "@remix-run/node";
|
||||
|
||||
import ForgotPasswordPage from "~/features/auth/pages/forgot-password";
|
||||
import forgotPasswordAction from "~/features/auth/actions/forgot-password";
|
||||
import forgotPasswordLoader from "~/features/auth/loaders/forgot-password";
|
||||
import { getSeoMeta } from "~/utils/seo";
|
||||
|
||||
export default ForgotPasswordPage;
|
||||
export const action = forgotPasswordAction;
|
||||
export const loader = forgotPasswordLoader;
|
||||
export const meta: MetaFunction = () => ({
|
||||
...getSeoMeta({ title: "Forgot password" }),
|
||||
});
|
13
app/routes/__auth/register.tsx
Normal file
13
app/routes/__auth/register.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import type { MetaFunction } from "@remix-run/node";
|
||||
|
||||
import RegisterPage from "~/features/auth/pages/register";
|
||||
import registerAction from "~/features/auth/actions/register";
|
||||
import registerLoader from "~/features/auth/loaders/register";
|
||||
import { getSeoMeta } from "~/utils/seo";
|
||||
|
||||
export default RegisterPage;
|
||||
export const action = registerAction;
|
||||
export const loader = registerLoader;
|
||||
export const meta: MetaFunction = () => ({
|
||||
...getSeoMeta({ title: "Register" }),
|
||||
});
|
13
app/routes/__auth/reset-password.tsx
Normal file
13
app/routes/__auth/reset-password.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import type { MetaFunction } from "@remix-run/node";
|
||||
|
||||
import ResetPasswordPage from "~/features/auth/pages/reset-password";
|
||||
import resetPasswordAction from "~/features/auth/actions/reset-password";
|
||||
import resetPasswordLoader from "~/features/auth/loaders/reset-password";
|
||||
import { getSeoMeta } from "~/utils/seo";
|
||||
|
||||
export default ResetPasswordPage;
|
||||
export const action = resetPasswordAction;
|
||||
export const loader = resetPasswordLoader;
|
||||
export const meta: MetaFunction = () => ({
|
||||
...getSeoMeta({ title: "Reset password" }),
|
||||
});
|
13
app/routes/__auth/sign-in.tsx
Normal file
13
app/routes/__auth/sign-in.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import type { MetaFunction } from "@remix-run/node";
|
||||
|
||||
import SignInPage from "~/features/auth/pages/sign-in";
|
||||
import signInAction from "~/features/auth/actions/sign-in";
|
||||
import signInLoader from "~/features/auth/loaders/sign-in";
|
||||
import { getSeoMeta } from "~/utils/seo";
|
||||
|
||||
export default SignInPage;
|
||||
export const action = signInAction;
|
||||
export const loader = signInLoader;
|
||||
export const meta: MetaFunction = () => ({
|
||||
...getSeoMeta({ title: "Sign in" }),
|
||||
});
|
9
app/routes/__auth/sign-out.tsx
Normal file
9
app/routes/__auth/sign-out.tsx
Normal file
@ -0,0 +1,9 @@
|
||||
import type { LoaderFunction } from "@remix-run/node";
|
||||
|
||||
import authenticator from "~/utils/authenticator.server";
|
||||
|
||||
export const loader: LoaderFunction = async ({ request }) => {
|
||||
const searchParams = new URL(request.url).searchParams;
|
||||
const redirectTo = searchParams.get("redirectTo") ?? "/";
|
||||
await authenticator.logout(request, { redirectTo });
|
||||
};
|
Reference in New Issue
Block a user