mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-12-10 23:42:37 +01:00
Ref: https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components
24 lines
587 B
TypeScript
24 lines
587 B
TypeScript
import { classNames } from "@repo/config-tailwind/classNames"
|
|
|
|
export interface MainLayoutProps extends React.ComponentPropsWithoutRef<"main"> {
|
|
className?: string
|
|
center?: boolean
|
|
}
|
|
|
|
export const MainLayout: React.FC<MainLayoutProps> = (props) => {
|
|
const { className, center = false, ...rest } = props
|
|
|
|
return (
|
|
<main
|
|
className={classNames(
|
|
"min-h-[calc(100vh-188px)] md:mx-auto md:max-w-4xl lg:max-w-7xl",
|
|
{
|
|
"flex flex-col items-center justify-center text-center": center,
|
|
},
|
|
className,
|
|
)}
|
|
{...rest}
|
|
/>
|
|
)
|
|
}
|