import { useTranslation } from 'react-i18next'; import { StyledLangButton, StyledNavbar, StyledNavlink, StyledNavlinkBrand, StyledNavlinkList, } from './styles/Navbar.styled'; interface NavLink { title: string; href: string; } function NavlinkList(props: { navlinks: NavLink[] }) { const { t } = useTranslation(); return ( <> {props.navlinks.map((navlink) => ( {t(`navbar.${navlink.title}`)} ))} ); } function LanguageChoice() { const { i18n } = useTranslation(); function changeLanguage() { i18n.changeLanguage(i18n.language == 'pl' ? 'en' : 'pl'); } return ( <> {i18n.language} ); } const navlinks = [ // { // title: 'home', // href: '#', // }, { title: 'about', href: '#', }, { title: 'projects', href: '#', }, { title: 'contact', href: '#', }, ]; export default function Navbar() { const { t } = useTranslation(); return ( {t('navbar.title')} ); }