* feat: v2 wallet * feat: Web3Wallet sign integration * chore: adds `core` to package.json * feat: Web3Wallet Auth integration * chore: core & web3wallet canary * chore: rm config * chore: force redeploy * chore: rm core & sign-client deps * fix: rm `sign-client` usage * refactor: updates README * feat: adds metadata mock obj & removes relay url param * refactor: more url mentions * refactor: rm v2 wallet readme references & uses web3wallet.core... * refactor: wallet -> web3wallet * refactor: rm wallet to web3wallet * fix: adds async to example listeners
90 lines
2.2 KiB
TypeScript
90 lines
2.2 KiB
TypeScript
import Navigation from '@/components/Navigation'
|
|
import RouteTransition from '@/components/RouteTransition'
|
|
import { Card, Container, Loading } from '@nextui-org/react'
|
|
import { Fragment, ReactNode } from 'react'
|
|
|
|
/**
|
|
* Types
|
|
*/
|
|
interface Props {
|
|
initialized: boolean
|
|
children: ReactNode | ReactNode[]
|
|
}
|
|
|
|
/**
|
|
* Container
|
|
*/
|
|
export default function Layout({ children, initialized }: Props) {
|
|
return (
|
|
<Container
|
|
display="flex"
|
|
justify="center"
|
|
alignItems="center"
|
|
css={{
|
|
width: '100vw',
|
|
height: '100vh',
|
|
paddingLeft: 0,
|
|
paddingRight: 0
|
|
}}
|
|
>
|
|
<Card
|
|
bordered={{ '@initial': false, '@xs': true }}
|
|
borderWeight={{ '@initial': 'light', '@xs': 'light' }}
|
|
css={{
|
|
height: '100%',
|
|
width: '100%',
|
|
justifyContent: initialized ? 'normal' : 'center',
|
|
alignItems: initialized ? 'normal' : 'center',
|
|
borderRadius: 0,
|
|
paddingBottom: 5,
|
|
'@xs': {
|
|
borderRadius: '$lg',
|
|
height: '95vh',
|
|
maxWidth: '450px'
|
|
}
|
|
}}
|
|
>
|
|
{initialized ? (
|
|
<Fragment>
|
|
<RouteTransition>
|
|
<Card.Body
|
|
css={{
|
|
display: 'block',
|
|
paddingLeft: 2,
|
|
paddingRight: 2,
|
|
paddingBottom: '40px',
|
|
'@xs': {
|
|
padding: '20px',
|
|
paddingBottom: '40px'
|
|
}
|
|
}}
|
|
>
|
|
{children}
|
|
</Card.Body>
|
|
</RouteTransition>
|
|
|
|
<Card.Footer
|
|
css={{
|
|
height: '85px',
|
|
minHeight: '85px',
|
|
position: 'sticky',
|
|
justifyContent: 'flex-end',
|
|
alignItems: 'flex-end',
|
|
boxShadow: '0 -30px 20px #111111',
|
|
backgroundColor: '#111111',
|
|
zIndex: 200,
|
|
bottom: 0,
|
|
left: 0
|
|
}}
|
|
>
|
|
<Navigation />
|
|
</Card.Footer>
|
|
</Fragment>
|
|
) : (
|
|
<Loading />
|
|
)}
|
|
</Card>
|
|
</Container>
|
|
)
|
|
}
|