docs: add error page (#13839)

This commit is contained in:
Shahed Nasser
2025-10-23 18:10:42 +03:00
committed by GitHub
parent 4ab185c685
commit 012e30801e
20 changed files with 653 additions and 62 deletions

View File

@@ -0,0 +1,12 @@
import { Inter, Roboto_Mono } from "next/font/google"
export const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
weight: ["400", "500"],
})
export const robotoMono = Roboto_Mono({
subsets: ["latin"],
variable: "--font-roboto-mono",
})

View File

@@ -0,0 +1,21 @@
"use client"
import { BareboneLayout, BrowserProvider, ErrorPage } from "docs-ui"
import { inter, robotoMono } from "./fonts"
import clsx from "clsx"
import "./globals.css"
export default function Error() {
return (
<BareboneLayout
htmlClassName={clsx(inter.variable, robotoMono.variable)}
gaId={process.env.NEXT_PUBLIC_GA_ID}
>
<body className="w-screen h-screen overflow-hidden bg-medusa-bg-subtle">
<BrowserProvider>
<ErrorPage />
</BrowserProvider>
</body>
</BareboneLayout>
)
}

View File

@@ -1,11 +1,11 @@
import type { Metadata } from "next"
import { Inter, Roboto_Mono } from "next/font/google"
import Providers from "@/providers"
import "./globals.css"
import { BareboneLayout, TightLayout } from "docs-ui"
import { config } from "@/config"
import clsx from "clsx"
import Footer from "../components/Footer"
import { inter, robotoMono } from "./fonts"
const ogImage =
"https://res.cloudinary.com/dza7lstvk/image/upload/v1732200992/Medusa%20Resources/opengraph-image_daq6nx.jpg"
@@ -41,17 +41,6 @@ export const metadata: Metadata = {
},
}
export const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
weight: ["400", "500"],
})
export const robotoMono = Roboto_Mono({
subsets: ["latin"],
variable: "--font-roboto-mono",
})
export default function RootLayout({
children,
}: {