Skip to content

Commit

Permalink
swap middleware for page handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Sep 2, 2024
1 parent 4f900b0 commit 290c911
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
5 changes: 5 additions & 0 deletions packages/explorer/src/app/(explorer)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { redirect } from "next/navigation";

export default async function IndexPage() {
redirect("/worlds");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { redirect } from "next/navigation";

export default async function WorldPage({ params }: { params: { worldAddress: string } }) {
return redirect(`/worlds/${params.worldAddress}/explorer`);
}
7 changes: 7 additions & 0 deletions packages/explorer/src/app/(explorer)/worlds/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { notFound, redirect } from "next/navigation";

export default async function WorldsPage() {
const worldAddress = process.env.WORLD_ADDRESS;
if (worldAddress) return redirect(`/worlds/${worldAddress}`);
return notFound();
}
16 changes: 0 additions & 16 deletions packages/explorer/src/middleware.ts

This file was deleted.

0 comments on commit 290c911

Please sign in to comment.