2020-10-07 09:41:58 -07:00
|
|
|
import * as React from 'react';
|
|
|
|
import { Flex, Spinner, useColorMode } from '@chakra-ui/core';
|
2020-01-21 20:02:50 -07:00
|
|
|
|
2020-09-28 11:54:00 -07:00
|
|
|
export const Loading = () => {
|
2020-07-05 17:20:10 -07:00
|
|
|
const { colorMode } = useColorMode();
|
2020-10-07 09:41:58 -07:00
|
|
|
const bg = { light: 'white', dark: 'black' };
|
|
|
|
const color = { light: 'black', dark: 'white' };
|
2020-07-05 17:20:10 -07:00
|
|
|
return (
|
|
|
|
<Flex
|
|
|
|
flexDirection="column"
|
|
|
|
minHeight="100vh"
|
|
|
|
w="100%"
|
|
|
|
bg={bg[colorMode]}
|
2020-10-07 09:41:58 -07:00
|
|
|
color={color[colorMode]}>
|
2020-07-05 17:20:10 -07:00
|
|
|
<Flex
|
|
|
|
as="main"
|
|
|
|
w="100%"
|
|
|
|
flexGrow={1}
|
|
|
|
flexShrink={1}
|
|
|
|
flexBasis="auto"
|
|
|
|
alignItems="center"
|
|
|
|
justifyContent="start"
|
|
|
|
textAlign="center"
|
|
|
|
flexDirection="column"
|
|
|
|
px={2}
|
|
|
|
py={0}
|
2020-10-07 09:41:58 -07:00
|
|
|
mt={['50%', '50%', '50%', '25%']}>
|
2020-07-05 17:20:10 -07:00
|
|
|
<Spinner color="primary.500" w="6rem" h="6rem" />
|
|
|
|
</Flex>
|
|
|
|
</Flex>
|
|
|
|
);
|
2020-01-21 20:02:50 -07:00
|
|
|
};
|