💄(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 { css } from '@/styled-system/css'
|
||||
import { flex } from '@/styled-system/patterns'
|
||||
import { Stack } from '@/styled-system/jsx'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { LanguageSelector } from '@/i18n/LanguageSelector'
|
||||
import { A, Badge, Text } from '@/primitives'
|
||||
import { authUrl, logoutUrl, useUser } from '@/features/auth'
|
||||
import { Text } from '@/primitives'
|
||||
import { SettingsButton } from '@/features/settings'
|
||||
|
||||
export const Header = () => {
|
||||
const { t } = useTranslation()
|
||||
const { user, isLoggedIn } = useUser()
|
||||
return (
|
||||
<div
|
||||
className={css({
|
||||
@@ -29,18 +26,7 @@ export const Header = () => {
|
||||
</Text>
|
||||
</header>
|
||||
<nav>
|
||||
<Stack gap={1} direction="row" align="center">
|
||||
<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>
|
||||
<SettingsButton />
|
||||
</nav>
|
||||
</Stack>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user