mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-04 10:25:04 +00:00
* format: prettier * fix: keep footer at the bottom of the page * fix: use calc to compute proper height
28 lines
672 B
TypeScript
28 lines
672 B
TypeScript
// Libraries
|
|
import { Container, Flex, Stack } from '@chakra-ui/react';
|
|
import { FC } from 'react';
|
|
|
|
// Components
|
|
import { Header } from '../UI';
|
|
import { Footer } from './Footer';
|
|
|
|
interface Props {
|
|
children?: React.ReactNode;
|
|
}
|
|
|
|
export const Layout: FC<Props> = ({ children }) => {
|
|
return (
|
|
<Container maxW={{ base: 'full', md: 'container.2xl' }} my={{ base: 4, md: 7 }}>
|
|
{/* adding min-height & top margin to keep footer at the bottom of the page */}
|
|
<Flex direction='column' minH='calc(100vh - 3.5rem)'>
|
|
<Header />
|
|
|
|
{children}
|
|
|
|
<Stack mt='auto'>
|
|
<Footer />
|
|
</Stack>
|
|
</Flex>
|
|
</Container>
|
|
);
|
|
};
|