Filename, language and highlighted lines
import { cn } from "cn"export function Button({ className, active, ...props }: ButtonProps) { return ( <button className={cn("rounded-md px-4 py-2", active && "bg-primary", className)} {...props} /> )}Diff: config change
const config = { output: "standalone", reactStrictMode: false, reactStrictMode: true, experimental: { typedRoutes: true, },}Max height with expand
type Result<T> = { ok: true; value: T } | { ok: false; error: Error }async function fetchJson<T>(url: string): Promise<Result<T>> { try { const response = await fetch(url) if (!response.ok) { return { ok: false, error: new Error(`HTTP ${response.status}`) } } const value = (await response.json()) as T return { ok: true, value } } catch (error) { return { ok: false, error: error instanceof Error ? error : new Error("Unknown error"), } }}export async function loadUsers() { const result = await fetchJson<{ id: string; name: string }[]>("/api/users") if (!result.ok) throw result.error return result.value}Bare, no header, no numbers
npx shadcn@latest add code-block