"use client"; import { FC, ReactNode } from "react"; import Image from "next/image"; import { useTheme } from "next-themes"; // logo/ images import PlaneBackgroundPatternDark from "public/auth/background-pattern-dark.svg"; import PlaneBackgroundPattern from "public/auth/background-pattern.svg"; import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png"; type TDefaultLayout = { children: ReactNode; withoutBackground?: boolean; }; export const DefaultLayout: FC = (props) => { const { children, withoutBackground = false } = props; // hooks const { resolvedTheme } = useTheme(); const patternBackground = resolvedTheme === "dark" ? PlaneBackgroundPatternDark : PlaneBackgroundPattern; return (
Plane Logo Plane
{!withoutBackground && (
Plane background pattern
)}
{children}
); };