diff --git a/app/[server]/layout.tsx b/app/[server]/layout.tsx new file mode 100644 index 0000000..2eb1b9d --- /dev/null +++ b/app/[server]/layout.tsx @@ -0,0 +1,37 @@ +import type { Metadata } from "next"; +import { notFound } from "next/navigation"; +import { serverList } from "@/constants/servers"; + +type Props = { + params: { server: string }; +}; + +export async function generateMetadata(props: Props): Promise { + const { + params: { server }, + } = props; + const serverName = serverList.find((s) => s.id === server)?.name; + + if (!serverName) return {}; + + return { + title: `${serverName} Earning`, + openGraph: { + title: `${serverName} Earning`, + }, + }; +} + +export default function Layout({ + children, + ...props +}: { children: React.ReactNode } & Props) { + const { + params: { server }, + } = props; + const serverInfo = serverList.find((s) => s.id === server); + + if (!serverInfo) return notFound(); + + return <>{children}; +} diff --git a/app/dwarves/nft/page.tsx b/app/[server]/nft/page.tsx similarity index 100% rename from app/dwarves/nft/page.tsx rename to app/[server]/nft/page.tsx diff --git a/app/dwarves/page.tsx b/app/[server]/page.tsx similarity index 100% rename from app/dwarves/page.tsx rename to app/[server]/page.tsx diff --git a/app/favicon.ico b/app/favicon.ico index 718d6fe..f83e493 100644 Binary files a/app/favicon.ico and b/app/favicon.ico differ diff --git a/components/stake/stake-input.tsx b/components/stake/stake-input.tsx index 9516e0a..1a2f05b 100644 --- a/components/stake/stake-input.tsx +++ b/components/stake/stake-input.tsx @@ -74,7 +74,7 @@ export const StakeInput = (props: Props) => { return (
-
+
You’re staking @@ -174,7 +174,7 @@ export const StakeInput = (props: Props) => {
-
+
≈ $0.00 USD diff --git a/constants/servers.ts b/constants/servers.ts new file mode 100644 index 0000000..7552b5b --- /dev/null +++ b/constants/servers.ts @@ -0,0 +1,6 @@ +export const serverList = [ + { + id: "dwarves", + name: "Dwarves Foundation", + }, +];