mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-01 00:24:20 +00:00
The metadata in the root layout referenced process.env.NEXT_PUBLIC_APP_URL with non-null assertions, but this env var is not guaranteed to be set (only .env.example exists). This caused `new URL(undefined)` to throw during SSR, resulting in a blank page on /create (and all other routes). Replace all NEXT_PUBLIC_APP_URL references in metadata with siteConfig.url and siteConfig.ogImage, which are already defined and used elsewhere in the same metadata block. https://claude.ai/code/session_01Ez3f6QxR3MxNq6YfAeqrcH
11 lines
266 B
TypeScript
11 lines
266 B
TypeScript
import { clsx, type ClassValue } from "clsx"
|
|
import { twMerge } from "tailwind-merge"
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs))
|
|
}
|
|
|
|
export function absoluteUrl(path: string) {
|
|
return `${process.env.NEXT_PUBLIC_APP_URL}${path}`
|
|
}
|