Files
919427231b no longer forcing theme in next/theme (#22817)
* init

* Update index.tsx

* Update apps/www/pages/ga.tsx

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>

* Update apps/www/pages/ga.tsx

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>

* Update apps/www/pages/ga-week/index.tsx

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>

* Update apps/www/pages/ga-week/index.tsx

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>

* Update index.tsx

* Update ga.tsx

* hack

* Update index.tsx

* use hook and check router

* update import

---------

Co-authored-by: Francesco Sansalvadore <f.sansalvadore@gmail.com>
Co-authored-by: Francesco Sansalvadore <francescosansalvadore@MacBook-Pro-2.local>
2024-04-17 12:39:15 +02:00

35 lines
747 B
TypeScript

import Nav from 'components/Nav/index'
import Footer from 'components/Footer/index'
import { cn } from 'ui'
import { useForceDeepDark } from '~/lib/theme.utils'
type Props = {
hideHeader?: boolean
hideFooter?: boolean
className?: string
footerClassName?: string
children: React.ReactNode
}
const DefaultLayout = (props: Props) => {
const {
hideHeader = false,
hideFooter = false,
className = '',
footerClassName = '',
children,
} = props
useForceDeepDark()
return (
<>
<Nav hideNavbar={hideHeader} />
<main className={cn('relative min-h-screen', className)}>{children}</main>
<Footer className={footerClassName} hideFooter={hideFooter} />
</>
)
}
export default DefaultLayout