chore: update remix to v2
This commit is contained in:
@@ -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 });
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user