docs: add error page (#13839)
This commit is contained in:
12
www/apps/user-guide/app/fonts.ts
Normal file
12
www/apps/user-guide/app/fonts.ts
Normal 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",
|
||||
})
|
||||
21
www/apps/user-guide/app/global-error.tsx
Normal file
21
www/apps/user-guide/app/global-error.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
@@ -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,
|
||||
}: {
|
||||
|
||||
Reference in New Issue
Block a user