Added a test page

This commit is contained in:
2025-03-16 23:42:30 +01:00
parent 04b2536aac
commit aee597acf2
3 changed files with 32 additions and 2 deletions

22
app/routes/test.tsx Normal file
View File

@@ -0,0 +1,22 @@
import type { Route } from "./+types/home";
import Test from "../pages/test";
import client from "~/api/client";
import type { Item } from "~/api/client";
export function meta({}: Route.MetaArgs) {
return [
{ title: "Aindustries' casino" },
{ name: "description", content: "Welcome to React Router!" },
];
}
export async function clientLoader() {
let item = await client.GET("/item", {
query: { uuid: "eee91ea1-1827-482b-b298-63bd6eda0221" },
});
return item;
}
export default function TestPage({ loaderData: item }: { loaderData: Item }) {
return <Test item={item} />;
}