diff options
Diffstat (limited to 'apps/web/src/app/base-page.tsx')
| -rw-r--r-- | apps/web/src/app/base-page.tsx | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/apps/web/src/app/base-page.tsx b/apps/web/src/app/base-page.tsx index 1841a1ee..78768581 100644 --- a/apps/web/src/app/base-page.tsx +++ b/apps/web/src/app/base-page.tsx @@ -1,56 +1,56 @@ -import { Header } from "@/components/header"; -import { Footer } from "@/components/footer"; -import { cn } from "@/utils/ui"; - -interface BasePageProps { - children: React.ReactNode; - className?: string; - mainClassName?: string; - maxWidth?: "3xl" | "6xl" | "full"; - title?: string; - description?: React.ReactNode; - action?: React.ReactNode; -} - -export function BasePage({ - children, - className = "", - mainClassName = "", - maxWidth = "3xl", - title, - description, - action, -}: BasePageProps) { - const maxWidthClass = { - "3xl": "max-w-3xl", - "6xl": "max-w-6xl", - full: "max-w-full", - }[maxWidth]; - - return ( - <section className={cn("bg-background min-h-screen", className)}> - <Header /> - <main - className={cn( - "relative container mx-auto flex flex-col gap-12 px-6 pt-12 pb-24 md:pt-24", - maxWidthClass, - mainClassName, - )} - > - {title && description && ( - <div className="flex flex-col gap-8 text-center"> - <h1 className="text-5xl font-bold tracking-tight md:text-6xl"> - {title} - </h1> - <p className="text-muted-foreground mx-auto max-w-2xl text-xl leading-relaxed"> - {description} - </p> - {action} - </div> - )} - {children} - </main> - <Footer /> - </section> - ); -} +import { Header } from "@/components/header";
+import { Footer } from "@/components/footer";
+import { cn } from "@/utils/ui";
+
+interface BasePageProps {
+ children: React.ReactNode;
+ className?: string;
+ mainClassName?: string;
+ maxWidth?: "3xl" | "6xl" | "full";
+ title?: string;
+ description?: React.ReactNode;
+ action?: React.ReactNode;
+}
+
+export function BasePage({
+ children,
+ className = "",
+ mainClassName = "",
+ maxWidth = "3xl",
+ title,
+ description,
+ action,
+}: BasePageProps) {
+ const maxWidthClass = {
+ "3xl": "max-w-3xl",
+ "6xl": "max-w-6xl",
+ full: "max-w-full",
+ }[maxWidth];
+
+ return (
+ <section className={cn("bg-background min-h-screen", className)}>
+ <Header />
+ <main
+ className={cn(
+ "relative container mx-auto flex flex-col gap-12 px-6 pt-12 pb-24 md:pt-24",
+ maxWidthClass,
+ mainClassName,
+ )}
+ >
+ {title && description && (
+ <div className="flex flex-col gap-8 text-center">
+ <h1 className="text-5xl font-bold tracking-tight md:text-6xl">
+ {title}
+ </h1>
+ <p className="text-muted-foreground mx-auto max-w-2xl text-xl leading-relaxed">
+ {description}
+ </p>
+ {action}
+ </div>
+ )}
+ {children}
+ </main>
+ <Footer />
+ </section>
+ );
+}
|
