-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(explorer): active chain as dynamic param (#3181)
- Loading branch information
Showing
38 changed files
with
253 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@latticexyz/explorer": patch | ||
--- | ||
|
||
Added ability to connect World Explorer to Redstone and Garnet chains. The active chain is now passed as a dynamic route parameter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { redirect } from "next/navigation"; | ||
|
||
type Props = { | ||
params: { | ||
chainName: string; | ||
}; | ||
}; | ||
|
||
export default async function ChainPage({ params }: Props) { | ||
return redirect(`/${params.chainName}/worlds`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../[worldAddress]/explore/TableSelector.tsx → .../[worldAddress]/explore/TableSelector.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
12 changes: 5 additions & 7 deletions
12
...dAddress]/interact/useContractMutation.ts → ...dAddress]/interact/useContractMutation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
...xplorer)/worlds/[worldAddress]/layout.tsx → ...ainName]/worlds/[worldAddress]/layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
"use client"; | ||
|
||
import { Navigation } from "../../../../components/Navigation"; | ||
import { Navigation } from "../../../../../components/Navigation"; | ||
import { Providers } from "./Providers"; | ||
|
||
export default function WorldLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<div> | ||
<Providers> | ||
<Navigation /> | ||
{children} | ||
</div> | ||
</Providers> | ||
); | ||
} |
2 changes: 1 addition & 1 deletion
2
...)/worlds/[worldAddress]/observe/Write.tsx → ...]/worlds/[worldAddress]/observe/Write.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../worlds/[worldAddress]/observe/Writes.tsx → .../worlds/[worldAddress]/observe/Writes.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { redirect } from "next/navigation"; | ||
|
||
type Props = { | ||
params: { | ||
chainName: string; | ||
worldAddress: string; | ||
}; | ||
}; | ||
|
||
export default async function WorldPage({ params }: Props) { | ||
const { chainName, worldAddress } = params; | ||
return redirect(`/${chainName}/worlds/${worldAddress}/explore`); | ||
} |
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
packages/explorer/src/app/(explorer)/[chainName]/worlds/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { notFound, redirect } from "next/navigation"; | ||
|
||
export const dynamic = "force-dynamic"; | ||
|
||
type Props = { | ||
params: { | ||
chainName: string; | ||
}; | ||
}; | ||
|
||
export default function WorldsPage({ params }: Props) { | ||
const worldAddress = process.env.WORLD_ADDRESS; | ||
if (worldAddress) return redirect(`/${params.chainName}/worlds/${worldAddress}`); | ||
return notFound(); | ||
} |
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
packages/explorer/src/app/(explorer)/worlds/[worldAddress]/page.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.