This commit is contained in:
Tommy D. Rossi
2025-12-30 14:25:19 +01:00
parent b19b7ae72d
commit 3decc28242
16 changed files with 612 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
import { redirect } from 'react-router';
export const loader = () => {
return redirect('https://github.com/remorses/playwriter');
};
export default function Index() {
return null;
}
+24
View File
@@ -0,0 +1,24 @@
import React from "react";
import { sleep } from "../lib/utils";
import { Route } from "./+types/defer-example";
async function getProjectLocation() {
return Promise.resolve().then(() => sleep(1000).then(() => "hi"));
}
export async function loader({}: Route.LoaderArgs) {
return {
project: getProjectLocation(),
};
}
export default function ProjectRoute({ loaderData }: Route.ComponentProps) {
const location = React.use(loaderData.project);
return (
<main>
<h1>Let's locate your project</h1>
<p>Your project is at {location}.</p>
</main>
);
}