From 1543f69f4aa7300d9cc6f230a91c3220a9cdb43f Mon Sep 17 00:00:00 2001 From: Zeeshan Mehboob <82993262+zesu22@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:13:34 +0530 Subject: [PATCH] [ES-1991] [ES-2026] remove eye icon & language dropdown (#477) * [ES-1991] remove extra eye icon for edge Signed-off-by: Zeeshan Mehboob * [ES-2026] remove language dropdown for ekyc video verification flow only Signed-off-by: Zeeshan Mehboob --------- Signed-off-by: Zeeshan Mehboob --- signup-ui/src/App.css | 5 ++ signup-ui/src/components/language.tsx | 113 ++++++++++++++------------ 2 files changed, 68 insertions(+), 50 deletions(-) diff --git a/signup-ui/src/App.css b/signup-ui/src/App.css index 3b0e556d..7a50a95b 100644 --- a/signup-ui/src/App.css +++ b/signup-ui/src/App.css @@ -408,6 +408,11 @@ body { @apply text-center text-2xl font-semibold; } +input[type='password']::-ms-reveal, +input[type='password']::-ms-clear { + display: none; +} + @layer base { :root { --font-inter: "Inter"; diff --git a/signup-ui/src/components/language.tsx b/signup-ui/src/components/language.tsx index 7cae1054..c091cefe 100644 --- a/signup-ui/src/components/language.tsx +++ b/signup-ui/src/components/language.tsx @@ -1,8 +1,10 @@ import { useCallback, useEffect, useRef } from "react"; import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; import { useTranslation } from "react-i18next"; +import { useLocation } from "react-router-dom"; import { ReactComponent as TranslationIcon } from "~assets/svg/translation-icon.svg"; +import { EKYC_VERIFICATION } from "~constants/routes"; import { cn } from "~utils/cn"; import { replaceUILocales } from "~utils/link"; import { @@ -14,6 +16,7 @@ import { import { Icons } from "./ui/icons"; export const Language = () => { + const { pathname } = useLocation(); const { i18n } = useTranslation(); const langRef = useRef(null); const { languages_2Letters, langFontMapping } = useLanguageStore( @@ -67,57 +70,67 @@ export const Language = () => { return (
- - - - { - languages_2Letters[ - i18n.language as keyof typeof languages_2Letters - ] - } - - - - - - {Object.entries(languages_2Letters).map(([key, value]) => ( - handleLanguageChange(key)} - > - {value} -
- {i18n.language === key && ( - + {pathname === EKYC_VERIFICATION && ( + + {languages_2Letters[i18n.language as keyof typeof languages_2Letters]} + + )} + {pathname !== EKYC_VERIFICATION && ( + + + + { + languages_2Letters[ + i18n.language as keyof typeof languages_2Letters + ] + } + + + + + + {Object.entries(languages_2Letters).map(([key, value]) => ( + - - ))} - - - - - - + onSelect={() => handleLanguageChange(key)} + > + {value} +
+ {i18n.language === key && ( + + )} +
+ + ))} + + + + + + + )}
); };