2021-12-15 08:11:58 -03:00
|
|
|
import Head from 'next/head'
|
|
|
|
|
|
2021-12-13 17:12:51 -03:00
|
|
|
import { useData } from '../../hooks/useData'
|
2021-12-12 23:45:41 -03:00
|
|
|
import { theme } from '../../styles/stitches.config'
|
|
|
|
|
import { Avatar } from '../Avatar'
|
|
|
|
|
import { Button } from '../Button'
|
|
|
|
|
import { SocialLinks } from '../SocialLinks'
|
|
|
|
|
import { Content, Description, Name, Wrapper } from './styles'
|
|
|
|
|
|
|
|
|
|
export const Home = () => {
|
|
|
|
|
const { data } = useData()
|
|
|
|
|
const { colors, buttonsSchema, outline, font, name, description } = data.settings
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Wrapper
|
|
|
|
|
css={{
|
2021-12-15 08:11:58 -03:00
|
|
|
color: theme.colors[colors.texts],
|
|
|
|
|
fontFamily: theme.fonts[font]
|
2021-12-12 23:45:41 -03:00
|
|
|
}}
|
|
|
|
|
>
|
2021-12-15 08:11:58 -03:00
|
|
|
<Head>
|
|
|
|
|
<style
|
|
|
|
|
dangerouslySetInnerHTML={{
|
|
|
|
|
__html: `body { background: ${theme.colors[colors.background]} }`
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Head>
|
2021-12-12 23:45:41 -03:00
|
|
|
<Content>
|
|
|
|
|
<Avatar />
|
|
|
|
|
<Name>{name}</Name>
|
|
|
|
|
<SocialLinks />
|
|
|
|
|
<Description>{description}</Description>
|
2021-12-13 17:12:51 -03:00
|
|
|
{data.buttonLinks?.map(link => (
|
|
|
|
|
<Button
|
2021-12-14 14:18:50 -03:00
|
|
|
colorSchema={colors.buttonLinks}
|
|
|
|
|
styleSchema={buttonsSchema}
|
2021-12-13 17:12:51 -03:00
|
|
|
outline={outline}
|
|
|
|
|
font={font}
|
|
|
|
|
key={link.href}
|
|
|
|
|
>
|
|
|
|
|
{link.label}
|
|
|
|
|
</Button>
|
|
|
|
|
))}
|
2021-12-12 23:45:41 -03:00
|
|
|
</Content>
|
|
|
|
|
</Wrapper>
|
|
|
|
|
)
|
|
|
|
|
}
|