handliong translations
This commit is contained in:
parent
a9f8da94c9
commit
f3506cff63
|
|
@ -10,9 +10,7 @@ import Logo from "./Logo.jsx";
|
|||
export default function Nav() {
|
||||
let location = useLocation();
|
||||
|
||||
const { language, screensTranslations } = useUser();
|
||||
|
||||
const uiTranslations = screensTranslations.ui;
|
||||
const { screensTranslations } = useUser();
|
||||
|
||||
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
||||
|
||||
|
|
@ -39,7 +37,9 @@ export default function Nav() {
|
|||
exit: { y: "-100%" },
|
||||
};
|
||||
|
||||
if (!screensTranslations || !screensTranslations) return <p>loading</p>;
|
||||
if (!screensTranslations || !screensTranslations.ui || !screensTranslations.pagesName) return <p>loading</p>;
|
||||
const uiTranslations = screensTranslations.ui;
|
||||
const pagesNamesTranslations = screensTranslations.pagesName;
|
||||
|
||||
return (
|
||||
<nav className='main-menu'>
|
||||
|
|
@ -65,20 +65,15 @@ export default function Nav() {
|
|||
className='cta cta--construction cta--button-icon cta--close'
|
||||
onClick={handleMenuOpen}></button>
|
||||
|
||||
{/* <ul className='navlist'>
|
||||
<NavLink to='/'>Welcome</NavLink>
|
||||
<NavLink to='/Home'>Home</NavLink>
|
||||
<NavLink to='/select-profile'>Profile</NavLink>
|
||||
<NavLink to='/select-country'>Country</NavLink>
|
||||
<NavLink to='/play'>Play</NavLink>
|
||||
<NavLink to='/results'>Results</NavLink>
|
||||
</ul> */}
|
||||
<ul className='menu__main-links'>
|
||||
<li>
|
||||
<Link to='/thematiques'>Thématiques</Link>
|
||||
<Link to='/about'>{pagesNamesTranslations.about}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link to='/about'>À propos</Link>
|
||||
<Link to='/themes'>
|
||||
{pagesNamesTranslations.themes}{" "}
|
||||
<span className='span-construction'>interactive</span>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user