Merge pull request 'fix/burger-translation' (#175) from fix/burger-translation into develop
Reviewed-on: http://85.143.176.51:3000/free-land/front-end/pulls/175
This commit is contained in:
commit
f677bffc16
@ -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 SVGEye } from "assets/svg/eye.svg";
|
||||||
import { ReactComponent as SVGArrowUp } from "assets/svg/arrow-up.svg";
|
import { ReactComponent as SVGArrowUp } from "assets/svg/arrow-up.svg";
|
||||||
import { ReactComponent as SVGCaretDown } from "assets/svg/caret-down.svg";
|
import { ReactComponent as SVGCaretDown } from "assets/svg/caret-down.svg";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
type Props = React.ComponentPropsWithoutRef<"div">;
|
type Props = React.ComponentPropsWithoutRef<"div">;
|
||||||
|
|
||||||
const Burger = (props: Props) => {
|
const Burger = (props: Props) => {
|
||||||
|
const { t, i18n } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<div {...props}>
|
<div {...props}>
|
||||||
<Menu as="div" className="relative inline-block text-left z-30">
|
<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"
|
leaveTo="transform opacity-0 scale-95"
|
||||||
>
|
>
|
||||||
<Menu.Items
|
<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"
|
shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"
|
||||||
>
|
>
|
||||||
<div className="py-1">
|
<div className="py-1">
|
||||||
<Disclosure>
|
<Disclosure>
|
||||||
<Disclosure.Button className="uppercase text-base px-2 py-1">
|
<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.Button>
|
||||||
</Disclosure>
|
</Disclosure>
|
||||||
<hr />
|
<hr />
|
||||||
@ -66,7 +70,7 @@ const Burger = (props: Props) => {
|
|||||||
text-base
|
text-base
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
my library
|
<span>{t("navbar.library.navTitle")}</span>
|
||||||
<SVGArrowUp
|
<SVGArrowUp
|
||||||
className={`${
|
className={`${
|
||||||
open ? "rotate-180 transform" : "rotate-360"
|
open ? "rotate-180 transform" : "rotate-360"
|
||||||
@ -83,7 +87,7 @@ const Burger = (props: Props) => {
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<SVGFile className="stroke-black w-4 h-4" />
|
<SVGFile className="stroke-black w-4 h-4" />
|
||||||
My Publications
|
<span>{t("navbar.library.publications")}</span>
|
||||||
</Disclosure.Panel>
|
</Disclosure.Panel>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
@ -96,7 +100,7 @@ const Burger = (props: Props) => {
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<SVGFavoriteOutlined className="stroke-black w-4 h-4" />
|
<SVGFavoriteOutlined className="stroke-black w-4 h-4" />
|
||||||
My Favorites
|
<span>{t("navbar.library.favorites")}</span>
|
||||||
</Disclosure.Panel>
|
</Disclosure.Panel>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
@ -109,7 +113,7 @@ const Burger = (props: Props) => {
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<SVGFolder className="stroke-black fill-black w-4 h-4" />
|
<SVGFolder className="stroke-black fill-black w-4 h-4" />
|
||||||
My Collections
|
<span>{t("navbar.library.collections")}</span>
|
||||||
</Disclosure.Panel>
|
</Disclosure.Panel>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
@ -122,7 +126,7 @@ const Burger = (props: Props) => {
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<SVGEye className="stroke-black w-4 h-4" />
|
<SVGEye className="stroke-black w-4 h-4" />
|
||||||
Recent Viewed
|
<span>{t("navbar.library.recentViewed")}</span>
|
||||||
</Disclosure.Panel>
|
</Disclosure.Panel>
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
@ -140,7 +144,7 @@ const Burger = (props: Props) => {
|
|||||||
text-base
|
text-base
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
About
|
<span>{t("navbar.about.navTitle")}</span>
|
||||||
<SVGArrowUp
|
<SVGArrowUp
|
||||||
className={`${
|
className={`${
|
||||||
open ? "rotate-180 transform" : "rotate-360"
|
open ? "rotate-180 transform" : "rotate-360"
|
||||||
@ -156,7 +160,7 @@ const Burger = (props: Props) => {
|
|||||||
text-base
|
text-base
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
About Freeland
|
<span>{t("navbar.about.aboutProject")}</span>
|
||||||
</Disclosure.Panel>
|
</Disclosure.Panel>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
@ -168,7 +172,7 @@ const Burger = (props: Props) => {
|
|||||||
text-base
|
text-base
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
Contact Us
|
<span>{t("navbar.about.contacts")}</span>
|
||||||
</Disclosure.Panel>
|
</Disclosure.Panel>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
@ -180,7 +184,7 @@ const Burger = (props: Props) => {
|
|||||||
text-base
|
text-base
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
Help
|
<span>{t("navbar.about.help")}</span>
|
||||||
</Disclosure.Panel>
|
</Disclosure.Panel>
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user