Skip to content

Commit c149b69

Browse files
committed
chore: faq-link
1 parent 927d5dc commit c149b69

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

src/app/[locale]/components/Navbar.tsx

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import React, { useMemo } from "react";
44

55
import clsx from "clsx";
6-
import Image from "next/image";
76
import Link from "next/link";
87
import { usePathname } from "next/navigation";
98

@@ -17,12 +16,14 @@ import {
1716
} from "@/components/ui/dropdown-menu";
1817
import { locales } from "@/i18n/routing";
1918
import { ExternalLink, HelpCircle } from "lucide-react";
19+
import { useTranslations } from "next-intl";
2020

2121
interface INavbar {
2222
locale: (typeof locales)[number];
2323
}
2424

2525
const 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

Comments
 (0)