mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fixes for empty layout
This commit is contained in:
parent
21335d3ed4
commit
55b6f8197c
2 changed files with 48 additions and 1 deletions
47
packages/web/components/templates/EmptyLayout.tsx
Normal file
47
packages/web/components/templates/EmptyLayout.tsx
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import { Box, HStack, VStack } from '../elements/LayoutPrimitives'
|
||||
import { PageMetaData } from '../patterns/PageMetaData'
|
||||
import { DEFAULT_HEADER_HEIGHT } from './homeFeed/HeaderSpacer'
|
||||
import { SettingsDropdown } from './navMenu/SettingsDropdown'
|
||||
|
||||
type EmptyLayoutProps = {
|
||||
title: string
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export function EmptyLayout(props: EmptyLayoutProps): JSX.Element {
|
||||
return (
|
||||
<VStack
|
||||
alignment="start"
|
||||
distribution="start"
|
||||
css={{ width: '100%', height: '100%', minHeight: '100vh' }}
|
||||
>
|
||||
<PageMetaData path="/" title={props.title} />
|
||||
<VStack css={{ width: '100%', height: '100%' }}>
|
||||
<Box
|
||||
css={{
|
||||
height: DEFAULT_HEADER_HEIGHT,
|
||||
'@mdDown': {
|
||||
display: 'none',
|
||||
},
|
||||
}}
|
||||
></Box>
|
||||
<Box
|
||||
css={{
|
||||
p: '15px',
|
||||
display: 'none',
|
||||
height: DEFAULT_HEADER_HEIGHT,
|
||||
'@mdDown': {
|
||||
display: 'flex',
|
||||
},
|
||||
}}
|
||||
>
|
||||
<SettingsDropdown />
|
||||
</Box>
|
||||
<HStack css={{ width: '100%', height: '100%' }} distribution="start">
|
||||
{props.children}
|
||||
</HStack>
|
||||
<Box css={{ height: '120px', width: '100%' }} />
|
||||
</VStack>
|
||||
</VStack>
|
||||
)
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { useRouter } from 'next/router'
|
||||
import { TermsAndConditions } from '../components/templates/TermsAndConditions'
|
||||
import { EmptyLayout } from '../components/templates/DocsLayout'
|
||||
import { EmptyLayout } from '../components/templates/EmptyLayout'
|
||||
|
||||
export default function Terms(): JSX.Element {
|
||||
const router = useRouter()
|
||||
|
|
|
|||
Loading…
Reference in a new issue