💄(header) just show the settings button in the header
for now! i wanna ditch the header anyway when we rework the conference view
This commit is contained in:
@@ -1,15 +1,12 @@
|
|||||||
import { Link } from 'wouter'
|
import { Link } from 'wouter'
|
||||||
import { css } from '@/styled-system/css'
|
import { css } from '@/styled-system/css'
|
||||||
import { flex } from '@/styled-system/patterns'
|
|
||||||
import { Stack } from '@/styled-system/jsx'
|
import { Stack } from '@/styled-system/jsx'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { LanguageSelector } from '@/i18n/LanguageSelector'
|
import { Text } from '@/primitives'
|
||||||
import { A, Badge, Text } from '@/primitives'
|
import { SettingsButton } from '@/features/settings'
|
||||||
import { authUrl, logoutUrl, useUser } from '@/features/auth'
|
|
||||||
|
|
||||||
export const Header = () => {
|
export const Header = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const { user, isLoggedIn } = useUser()
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={css({
|
className={css({
|
||||||
@@ -29,18 +26,7 @@ export const Header = () => {
|
|||||||
</Text>
|
</Text>
|
||||||
</header>
|
</header>
|
||||||
<nav>
|
<nav>
|
||||||
<Stack gap={1} direction="row" align="center">
|
<SettingsButton />
|
||||||
<LanguageSelector />
|
|
||||||
{isLoggedIn === false && <A href={authUrl()}>{t('login')}</A>}
|
|
||||||
{!!user && (
|
|
||||||
<p className={flex({ gap: 1, align: 'center' })}>
|
|
||||||
<Badge>{user.email}</Badge>
|
|
||||||
<A href={logoutUrl()} size="sm">
|
|
||||||
{t('logout')}
|
|
||||||
</A>
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
</nav>
|
</nav>
|
||||||
</Stack>
|
</Stack>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user