Skip to content

Instantly share code, notes, and snippets.

@FrancisGregori
Created November 25, 2023 23:29
Show Gist options
  • Save FrancisGregori/fc8aa5909bb2ece54a73e4576d113a46 to your computer and use it in GitHub Desktop.
Save FrancisGregori/fc8aa5909bb2ece54a73e4576d113a46 to your computer and use it in GitHub Desktop.
import React from 'react';
import Link from 'next/link';
import { useTranslations } from 'next-intl';
const Navbar = () => {
const t = useTranslations('components.navbar');
return (
<header className="w-full border-b border-gray-200 bg-white/75 p-4 py-4 shadow-md">
<nav className="container mx-auto flex w-full items-center justify-between font-semibold">
<ul className="flex gap-x-8">
<li>
<Link href={'/'}>{t('home')}</Link>
</li>
<li>
<Link href={'/about'}>{t('about')}</Link>
</li>
</ul>
// rest of the code...
</nav>
</header>
);
};
export default Navbar;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment