Commit b8d66e51 authored by v.mattfeld's avatar v.mattfeld
Browse files

style: 💄 update header style

parent 0137b507
import { Button, Flex, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, useDisclosure } from '@chakra-ui/react'
import { PrimaryButton } from '../PrimaryButton'
import { Text, Box, Button, Flex, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, Spacer, useDisclosure, Code } from '@chakra-ui/react'
import LoginForm from '../LoginForm'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { useRecoilValue } from 'recoil'
import { userState } from 'pages/annotate'
const Header = () => {
const { isOpen, onOpen, onClose } = useDisclosure()
const { t } = useTranslation();
const { i18n } = useTranslation()
const { uid } = useRecoilValue(userState)
return (
<Flex justifyContent={'flex-end'}>
<Button
size='sm'
m={3}
onClick={() => {
const lang = i18n.language == 'en' ? 'de' : 'en';
i18n.changeLanguage(lang)
}}>Sprache / Language</Button>
<Button size="sm" m={3} onClick={onOpen}>
{t("loginTitle")}
</Button>
<Flex>
<Text m={3}>
User ID: <Code>{uid}</Code>
</Text>
<Spacer />
<Box>
<Button
size='sm'
m={3}
onClick={() => {
const lang = i18n.language == 'en' ? 'de' : 'en';
i18n.changeLanguage(lang)
}}>Sprache / Language</Button>
<Button size="sm" m={3} onClick={onOpen}>
{t("loginTitle")}
</Button>
</Box>
<Modal isOpen={isOpen} onClose={onClose}>
<ModalOverlay />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment