The translation in burger component resolved
This commit is contained in:
parent
e9e9611f80
commit
a4ef589ca9
@ -21,10 +21,12 @@ import { ReactComponent as SVGFile } from "assets/svg/file.svg";
|
||||
import { ReactComponent as SVGEye } from "assets/svg/eye.svg";
|
||||
import { ReactComponent as SVGArrowUp } from "assets/svg/arrow-up.svg";
|
||||
import { ReactComponent as SVGCaretDown } from "assets/svg/caret-down.svg";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
type Props = React.ComponentPropsWithoutRef<"div">;
|
||||
|
||||
const Burger = (props: Props) => {
|
||||
const { t, i18n } = useTranslation();
|
||||
return (
|
||||
<div {...props}>
|
||||
<Menu as="div" className="relative inline-block text-left z-30">
|
||||
@ -46,13 +48,15 @@ const Burger = (props: Props) => {
|
||||
leaveTo="transform opacity-0 scale-95"
|
||||
>
|
||||
<Menu.Items
|
||||
className="origin-top-right absolute right-0 mt-5 w-44 rounded-md
|
||||
className="origin-top-right absolute right-0 mt-5 w-48 rounded-md
|
||||
shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"
|
||||
>
|
||||
<div className="py-1">
|
||||
<Disclosure>
|
||||
<Disclosure.Button className="uppercase text-base px-2 py-1">
|
||||
<Link className="text-[#096DD9]">create new</Link>
|
||||
<Link className="text-[#096DD9]">
|
||||
{t("navbar.createNew")}
|
||||
</Link>
|
||||
</Disclosure.Button>
|
||||
</Disclosure>
|
||||
<hr />
|
||||
@ -66,7 +70,7 @@ const Burger = (props: Props) => {
|
||||
text-base
|
||||
"
|
||||
>
|
||||
my library
|
||||
<span>{t("navbar.library.navTitle")}</span>
|
||||
<SVGArrowUp
|
||||
className={`${
|
||||
open ? "rotate-180 transform" : "rotate-360"
|
||||
@ -83,7 +87,7 @@ const Burger = (props: Props) => {
|
||||
"
|
||||
>
|
||||
<SVGFile className="stroke-black w-4 h-4" />
|
||||
My Publications
|
||||
<span>{t("navbar.library.publications")}</span>
|
||||
</Disclosure.Panel>
|
||||
</Link>
|
||||
|
||||
@ -96,7 +100,7 @@ const Burger = (props: Props) => {
|
||||
"
|
||||
>
|
||||
<SVGFavoriteOutlined className="stroke-black w-4 h-4" />
|
||||
My Favorites
|
||||
<span>{t("navbar.library.favorites")}</span>
|
||||
</Disclosure.Panel>
|
||||
</Link>
|
||||
|
||||
@ -109,7 +113,7 @@ const Burger = (props: Props) => {
|
||||
"
|
||||
>
|
||||
<SVGFolder className="stroke-black fill-black w-4 h-4" />
|
||||
My Collections
|
||||
<span>{t("navbar.library.collections")}</span>
|
||||
</Disclosure.Panel>
|
||||
</Link>
|
||||
|
||||
@ -122,7 +126,7 @@ const Burger = (props: Props) => {
|
||||
"
|
||||
>
|
||||
<SVGEye className="stroke-black w-4 h-4" />
|
||||
Recent Viewed
|
||||
<span>{t("navbar.library.recentViewed")}</span>
|
||||
</Disclosure.Panel>
|
||||
</Link>
|
||||
</>
|
||||
@ -140,7 +144,7 @@ const Burger = (props: Props) => {
|
||||
text-base
|
||||
"
|
||||
>
|
||||
About
|
||||
<span>{t("navbar.about.navTitle")}</span>
|
||||
<SVGArrowUp
|
||||
className={`${
|
||||
open ? "rotate-180 transform" : "rotate-360"
|
||||
@ -156,7 +160,7 @@ const Burger = (props: Props) => {
|
||||
text-base
|
||||
"
|
||||
>
|
||||
About Freeland
|
||||
<span>{t("navbar.about.aboutProject")}</span>
|
||||
</Disclosure.Panel>
|
||||
</Link>
|
||||
|
||||
@ -168,7 +172,7 @@ const Burger = (props: Props) => {
|
||||
text-base
|
||||
"
|
||||
>
|
||||
Contact Us
|
||||
<span>{t("navbar.about.contacts")}</span>
|
||||
</Disclosure.Panel>
|
||||
</Link>
|
||||
|
||||
@ -180,7 +184,7 @@ const Burger = (props: Props) => {
|
||||
text-base
|
||||
"
|
||||
>
|
||||
Help
|
||||
<span>{t("navbar.about.help")}</span>
|
||||
</Disclosure.Panel>
|
||||
</Link>
|
||||
</>
|
||||
|
Loading…
x
Reference in New Issue
Block a user