chore: update remix to v2

This commit is contained in:
Andrea
2023-10-21 19:30:32 +02:00
parent 8222a4dfb2
commit 8a9fd697b5
15 changed files with 2367 additions and 5821 deletions

View File

@@ -1,4 +1,4 @@
import type { LoaderArgs } from "@remix-run/node";
import type { LoaderFunctionArgs } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { getMDXComponent } from "mdx-bundler/client";
import React from "react";
@@ -11,7 +11,7 @@ export const handle = {
text: "Go Back",
};
export const loader = async ({ params }: LoaderArgs) => {
export const loader = async ({ params }: LoaderFunctionArgs) => {
const name = params.name;
if (name == null) {
throw new Response(null, { status: 400 });

View File

@@ -3,7 +3,9 @@ import { LinkWrapper } from "~/components/LinkWrapper";
import { useMatch } from "./useMatch";
export default function () {
const { handle } = useMatch();
const { handle } = useMatch() as unknown as {
handle: { to: string; text: string };
};
return (
<div>
<LinkWrapper>