From 01a873477b547e1f425087c1b66d92ba0c9e24ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”> Date: Wed, 19 Oct 2022 16:58:19 +0300 Subject: [PATCH 1/2] resolve localization button in the header --- src/components/parts/Header.tsx | 97 +++++++++++++++++---------------- 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/src/components/parts/Header.tsx b/src/components/parts/Header.tsx index 9fbd384..258238c 100755 --- a/src/components/parts/Header.tsx +++ b/src/components/parts/Header.tsx @@ -5,7 +5,7 @@ import { useState, useTransition } from "react"; /* -------------------------------------------------------------------------- */ import ContextMenuAction from "../drop-down-menu/ContextMenuAction"; import ContextMenu from "../drop-down-menu/ContextMenu"; -import LogoScipaper from "../LogoScipaper"; +import Logofreeland from "../Logofreeland"; import { Button } from "../Button/Button"; import Avatar from "../Avatar"; import Navbar from "../Navbar"; @@ -25,6 +25,8 @@ import { } from "components/icons"; import i18n from "localization/i18n"; import { useTranslation } from "react-i18next"; +import LocalizationButton from "components/LocalizationButton"; +import Link from "components/typography/Link"; const Header = () => { const [authenticated, setAuthenticated] = useState(false); @@ -47,16 +49,16 @@ const Header = () => { xl:gap-60 xl:px-16" > {/* Logo and Menu */} -
+
{/* Logo - start - className="w-7 sm:w-10 " /> */} - + - - + {/* Logo - end - */} {/* Menu( Create new - My library - About ) Start */} @@ -69,36 +71,36 @@ const Header = () => { className="text-blue-500 px-4 font-bold uppercase" to="/create-new" > - {t('navbar.createNew')} + {t("navbar.createNew")} {/* Link Create now - end - */} {/* Dropdown Menu My library - start - */} console.log("My publications")} icon={} > console.log("My Favorites")} icon={} > console.log("My Collections")} icon={} > console.log("Recent Viewed")} icon={} > @@ -108,21 +110,21 @@ const Header = () => { {/* Dropdown Menu About - start - */} console.log("About Freeland")} > console.log("Contact Us")} > console.log("Help")} > @@ -135,38 +137,41 @@ const Header = () => {
{!authenticated ? [ - , - , - ] + <> + + + , + , + ] : [ - , + , - , - ]} + , + ]} {/* Burger component will be shown for the small screens */}
From 9c79f449c58eaa25dea5f608bd158a167bd1fed1 Mon Sep 17 00:00:00 2001 From: danysmall Date: Wed, 19 Oct 2022 17:30:50 +0300 Subject: [PATCH 2/2] Manually merge --- src/components/SearchResultsSection.tsx | 2 +- src/components/parts/Header.tsx | 66 ++++++++++++------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/components/SearchResultsSection.tsx b/src/components/SearchResultsSection.tsx index 26a3d8d..f769b5c 100644 --- a/src/components/SearchResultsSection.tsx +++ b/src/components/SearchResultsSection.tsx @@ -36,7 +36,7 @@ export const SearchResultSection = () => { {t("searchResults.title")} - {t("searchResults.totalResults")}: {searchResults?.meta.total} + {t("searchResults.totalResults")}: {searchResults?.meta.total}

diff --git a/src/components/parts/Header.tsx b/src/components/parts/Header.tsx index 258238c..a34dc4d 100755 --- a/src/components/parts/Header.tsx +++ b/src/components/parts/Header.tsx @@ -5,7 +5,6 @@ import { useState, useTransition } from "react"; /* -------------------------------------------------------------------------- */ import ContextMenuAction from "../drop-down-menu/ContextMenuAction"; import ContextMenu from "../drop-down-menu/ContextMenu"; -import Logofreeland from "../Logofreeland"; import { Button } from "../Button/Button"; import Avatar from "../Avatar"; import Navbar from "../Navbar"; @@ -25,8 +24,9 @@ import { } from "components/icons"; import i18n from "localization/i18n"; import { useTranslation } from "react-i18next"; -import LocalizationButton from "components/LocalizationButton"; import Link from "components/typography/Link"; +import LocalizationButton from "components/LocalizationButton"; +import LogoScipaper from "components/LogoScipaper"; const Header = () => { const [authenticated, setAuthenticated] = useState(false); @@ -55,7 +55,7 @@ const Header = () => { - @@ -137,41 +137,41 @@ const Header = () => {
{!authenticated ? [ - <> - - - , + <> + , - ] + {t("navbar.auth.signIn")} + + , + , + ] : [ - , + , - , - ]} + , + ]} {/* Burger component will be shown for the small screens */}