mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
* feat: metamask switch network support + fixed dependancy cycle * feat: moved landing to index * feat: updated favicon * fix: fixed landing page issues + scrollSnap * feat: join button * fix: fixed seed script with new prod schema * feat: join button redirects based on user creation date * fix: minor ui bug fixes * feat: connect to mainnet to continue with switch network on metamask * fix: uniform setup screens * fix: fixed XP on dashboard * feat: added start page * fix: fixed issues on landing page * fix: fixed minor issues on dashboard * fix: update idx profile in auth webhook for new players * fix: minor fixes in seed page * fix: player avatar & type * fix: incorporated review comments from @dysbulic & @vidvidvid * fix: more review comments
71 lines
1.5 KiB
TypeScript
71 lines
1.5 KiB
TypeScript
import { Flex, FlexProps, Stack, StackProps } from '@metafam/ds';
|
|
import { HeadComponent } from 'components/Seo';
|
|
|
|
export const PageContainer: React.FC<FlexProps> = ({ children, ...props }) => (
|
|
<Flex
|
|
w="100%"
|
|
h="100%"
|
|
p={{ base: 3, sm: 8, lg: 12 }}
|
|
direction="column"
|
|
align="center"
|
|
pos="relative"
|
|
{...props}
|
|
>
|
|
{children}
|
|
</Flex>
|
|
);
|
|
|
|
export const FlexContainer: React.FC<StackProps> = ({ children, ...props }) => (
|
|
<Stack w="full" align="center" justify="center" spacing={[6, 8]} {...props}>
|
|
{children}
|
|
</Stack>
|
|
);
|
|
|
|
type EmbedProps = {
|
|
title: string;
|
|
description: string;
|
|
url: string;
|
|
} & FlexProps;
|
|
|
|
export const EmbedContainer: React.FC<EmbedProps> = ({
|
|
title,
|
|
description,
|
|
url,
|
|
...props
|
|
}) => (
|
|
<Flex w="100%" h="100%" direction="column" {...props}>
|
|
<HeadComponent title={title} description={description} url={url} />
|
|
<iframe
|
|
title={title}
|
|
src={url}
|
|
style={{
|
|
width: '100%',
|
|
height: '100%',
|
|
}}
|
|
/>
|
|
</Flex>
|
|
);
|
|
|
|
export const FullPageContainer: React.FC<
|
|
StackProps & { bgImageUrl?: string }
|
|
> = ({ bgImageUrl, sx, children, ...props }) => (
|
|
<FlexContainer
|
|
minH="100vh"
|
|
bg="dark"
|
|
bgImage={bgImageUrl && `url(${bgImageUrl})`}
|
|
bgPosition="center"
|
|
bgAttachment="fixed"
|
|
bgSize="cover"
|
|
spacing={0}
|
|
p={{ base: 4, md: 8, lg: 12 }}
|
|
sx={{
|
|
scrollSnapAlign: 'start',
|
|
scrollSnapStop: 'normal',
|
|
...sx,
|
|
}}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</FlexContainer>
|
|
);
|