Commit 7ac6e22c authored by tom's avatar tom

fixes after merge

parent 1ce2d44e
...@@ -5,8 +5,8 @@ import Page from 'ui/shared/Page/Page'; ...@@ -5,8 +5,8 @@ import Page from 'ui/shared/Page/Page';
const App = () => { const App = () => {
return ( return (
<Page wrapChildren={ false } rowGap={ 10 }> <Page wrapChildren={ false }>
<Center bgColor={ useColorModeValue('blackAlpha.200', 'whiteAlpha.200') } h="100%" w="100%" flexGrow={ 1 }> <Center as="main" bgColor={ useColorModeValue('blackAlpha.200', 'whiteAlpha.200') } h="100%" paddingTop={{ base: '138px', lg: 0 }}>
3rd party app content 3rd party app content
</Center> </Center>
</Page> </Page>
......
import { chakra, VStack, Box, HStack } from '@chakra-ui/react'; import { Flex } from '@chakra-ui/react';
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import React from 'react'; import React from 'react';
import * as cookies from 'lib/cookies'; import * as cookies from 'lib/cookies';
import useFetch from 'lib/hooks/useFetch'; import useFetch from 'lib/hooks/useFetch';
import PageContent from 'ui/shared/Page/PageContent';
import Header from 'ui/snippets/header/Header'; import Header from 'ui/snippets/header/Header';
import NavigationDesktop from 'ui/snippets/navigation/NavigationDesktop'; import NavigationDesktop from 'ui/snippets/navigation/NavigationDesktop';
interface Props { interface Props {
children: React.ReactNode; children: React.ReactNode;
wrapChildren?: boolean; wrapChildren?: boolean;
className?: string;
} }
const Page = ({ children }: Props) => { const Page = ({ children, wrapChildren = true }: Props) => {
const router = useRouter(); const router = useRouter();
const fetch = useFetch(); const fetch = useFetch();
...@@ -32,31 +32,19 @@ const Page = ({ children }: Props) => { ...@@ -32,31 +32,19 @@ const Page = ({ children }: Props) => {
} }
}, [ networkType, networkSubType ]); }, [ networkType, networkSubType ]);
const renderedChildren = wrapChildren ? (
<PageContent>{ children }</PageContent>
) : children;
return ( return (
<HStack <Flex w="100%" minH="100vh" alignItems="stretch">
w="100%"
minH="100vh"
alignItems="stretch"
>
<NavigationDesktop/> <NavigationDesktop/>
<VStack <Flex flexDir="column" width="100%">
width="100%"
paddingX={{ base: 4, lg: 8 }}
paddingTop={{ base: 0, lg: 9 }}
paddingBottom={ 10 }
spacing={ 0 }
>
<Header/> <Header/>
<Box { renderedChildren }
as="main" </Flex>
w="100%" </Flex>
paddingTop={{ base: '138px', lg: '52px' }}
>
{ children }
</Box>
</VStack>
</HStack>
); );
}; };
export default chakra(Page); export default Page;
...@@ -40,6 +40,9 @@ const Header = () => { ...@@ -40,6 +40,9 @@ const Header = () => {
justifyContent="center" justifyContent="center"
gap={ 12 } gap={ 12 }
display={{ base: 'none', lg: 'flex' }} display={{ base: 'none', lg: 'flex' }}
paddingX={ 12 }
paddingTop={ 9 }
paddingBottom="52px"
> >
<SearchBar/> <SearchBar/>
<ColorModeToggler/> <ColorModeToggler/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment