diff --git a/apps/website/.env.example b/apps/website/.env.example index f3f7bbb..23568b7 100644 --- a/apps/website/.env.example +++ b/apps/website/.env.example @@ -1,6 +1,3 @@ -# Website URL -NEXT_PUBLIC_SITE_URL= - # Event Cache URL NEXT_PUBLIC_API_EVENT_CACHE= diff --git a/apps/website/app/layout.tsx b/apps/website/app/layout.tsx index 920dc4b..4c1ec9c 100644 --- a/apps/website/app/layout.tsx +++ b/apps/website/app/layout.tsx @@ -2,30 +2,23 @@ import "@/styles/app.css" import "@/styles/globals.css" import { ReactNode } from "react" -import { env } from "@/env.mjs" +import { type Metadata } from "next" import { siteConfig } from "@/config/site" import { fontSans } from "@/lib/fonts" import { cn } from "@/lib/utils" import RootProvider from "@/components/providers/root-provider" -const url = env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000" - -export const metadata = { - metadataBase: new URL(url), +export const metadata: Metadata = { title: `${siteConfig.name} - ${siteConfig.description}`, description: siteConfig.description, manifest: "/manifest.json", icons: { icon: "/favicon.ico", }, - visualViewport: { - themeColor: "#feefc4", - }, openGraph: { title: siteConfig.name, description: siteConfig.description, - url: url?.toString(), siteName: siteConfig.name, type: "website", }, diff --git a/apps/website/env.mjs b/apps/website/env.mjs index 3c5398f..85b1472 100644 --- a/apps/website/env.mjs +++ b/apps/website/env.mjs @@ -3,7 +3,6 @@ import { z } from "zod" export const env = createEnv({ client: { - NEXT_PUBLIC_SITE_URL: z.string().url().optional(), NEXT_PUBLIC_API_EVENT_CACHE: z.string().url(), NEXT_PUBLIC_MAINNET_RPC: z.string().url().optional(), NEXT_PUBLIC_BASE_RPC: z.string().url().optional(), @@ -15,7 +14,6 @@ export const env = createEnv({ NEXT_PUBLIC_ALCHEMY_API_KEY: z.string().min(1), }, runtimeEnv: { - NEXT_PUBLIC_SITE_URL: process.env.NEXT_PUBLIC_SITE_URL, NEXT_PUBLIC_API_EVENT_CACHE: process.env.NEXT_PUBLIC_API_EVENT_CACHE, NEXT_PUBLIC_MAINNET_RPC: process.env.NEXT_PUBLIC_MAINNET_RPC, NEXT_PUBLIC_BASE_RPC: process.env.NEXT_PUBLIC_BASE_RPC, diff --git a/apps/website/lib/utils/index.ts b/apps/website/lib/utils/index.ts index 1409e17..f228390 100644 --- a/apps/website/lib/utils/index.ts +++ b/apps/website/lib/utils/index.ts @@ -1,4 +1,3 @@ -import { env } from "@/env.mjs" import { ClassValue, clsx } from "clsx" import { twMerge } from "tailwind-merge" @@ -15,10 +14,6 @@ export function formatDate(input: string | number): string { }) } -export function absoluteUrl(path: string) { - return `${env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000"}${path}` -} - export function trimFormattedBalance( balance: string | undefined, decimals = 4