33import React , { useMemo } from "react" ;
44
55import clsx from "clsx" ;
6- import Image from "next/image" ;
76import Link from "next/link" ;
87import { usePathname } from "next/navigation" ;
98
@@ -17,12 +16,14 @@ import {
1716} from "@/components/ui/dropdown-menu" ;
1817import { locales } from "@/i18n/routing" ;
1918import { ExternalLink , HelpCircle } from "lucide-react" ;
19+ import { useTranslations } from "next-intl" ;
2020
2121interface INavbar {
2222 locale : ( typeof locales ) [ number ] ;
2323}
2424
2525const Navbar : React . FC < INavbar > = ( { locale } ) => {
26+ const t = useTranslations ( "navbar" ) ;
2627 const pathname = usePathname ( ) ;
2728
2829 const pathWithoutLocale = useMemo (
@@ -52,16 +53,24 @@ const Navbar: React.FC<INavbar> = ({ locale }) => {
5253 />
5354 </ Link >
5455 < div className = "flex items-center gap-4" >
55- < Button
56- variant = "ghost"
57- size = "sm"
58- className = "text-white hover:bg-white/20"
59- dir = "auto"
56+ < Link
57+ href = {
58+ "https://www.notion.so/kleros/FAQ-about-Kleros-Enterprise-1f59a9db4f08808a94fdf2598f644c1e?showMoveTo=true&saveParent=true"
59+ }
60+ rel = "noreferrer"
61+ target = "_blank"
6062 >
61- < HelpCircle className = "w-4 h-4 mr-2" />
62- FAQ
63- < ExternalLink className = "w-3 h-3 ml-1" />
64- </ Button >
63+ < Button
64+ variant = "ghost"
65+ size = "sm"
66+ className = "text-white hover:bg-white/20"
67+ dir = "auto"
68+ >
69+ < HelpCircle className = "w-4 h-4 mr-2" />
70+ { t ( "faq" ) }
71+ < ExternalLink className = "w-3 h-3 ml-1" />
72+ </ Button >
73+ </ Link >
6574 < div
6675 className = { clsx (
6776 "justify-self-end place-self-center" ,
@@ -80,19 +89,21 @@ const Navbar: React.FC<INavbar> = ({ locale }) => {
8089 < DropdownMenuContent className = "min-w-min" >
8190 { locales . map ( ( innerLocale ) =>
8291 innerLocale !== locale ? (
83- < DropdownMenuItem
92+ < Link
93+ href = { `/${ innerLocale } /${ pathWithoutLocale } ` }
8494 key = { innerLocale }
85- className = { clsx (
86- "hover:cursor-pointer hover:bg-light-background" ,
87- "py-2 px-4" ,
88- ) }
8995 >
90- < Link href = { `/${ innerLocale } /${ pathWithoutLocale } ` } >
96+ < DropdownMenuItem
97+ className = { clsx (
98+ "hover:cursor-pointer hover:bg-light-background" ,
99+ "py-2 px-4" ,
100+ ) }
101+ >
91102 < span className = "text-primary-text text-center" >
92103 { innerLocale . toUpperCase ( ) }
93104 </ span >
94- </ Link >
95- </ DropdownMenuItem >
105+ </ DropdownMenuItem >
106+ </ Link >
96107 ) : null ,
97108 ) }
98109 </ DropdownMenuContent >
0 commit comments