diff --git a/README.md b/README.md index 07346f3..4680fdd 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,7 @@ First, create a `/login` page. Here we will render a form to get the email and p ```tsx // app/routes/login.tsx -import type { ActionArgs, LoaderArgs } from "@remix-run/node"; -import { redirect } from "@remix-run/node"; +import type { ActionFunctionArgs, LoaderFunctionArgs } from "@remix-run/node"; import { Form } from "@remix-run/react"; import { authenticator } from "~/services/auth.server"; @@ -123,7 +122,7 @@ export default function Screen() { // Second, we need to export an action function, here we will use the // `authenticator.authenticate method` -export async function action({ request }: ActionArgs) { +export async function action({ request }: ActionFunctionArgs) { // we call the method with the name of the strategy we want to use and the // request object, optionally we pass an object with the URLs we want the user // to be redirected to after a success or a failure @@ -136,7 +135,7 @@ export async function action({ request }: ActionArgs) { // Finally, we can export a loader function where we check if the user is // authenticated with `authenticator.isAuthenticated` and redirect to the // dashboard if it is or return null if it's not -export async function loader({ request }: LoaderArgs) { +export async function loader({ request }: LoaderFunctionArgs) { // If the user is already authenticated redirect to /dashboard directly return await authenticator.isAuthenticated(request, { successRedirect: "/dashboard",