remixed v0

This commit is contained in:
m5r
2022-05-14 12:22:06 +02:00
parent 9275d4499b
commit 98b89ae0f7
338 changed files with 22549 additions and 44628 deletions

View 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" }),
});

View 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" }),
});

View 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" }),
});

View 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" }),
});

View 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 });
};