From 9e5d1c61fbeec87fb463d7806220a2ab73a7cb72 Mon Sep 17 00:00:00 2001 From: lillian-tran Date: Mon, 9 Dec 2024 00:25:49 -0500 Subject: [PATCH] welcome page styling edits --- src/components/Dropdown/LanguageDropdown.jsx | 16 ++++--- src/pages/Welcome.jsx | 47 +++++++++++--------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/src/components/Dropdown/LanguageDropdown.jsx b/src/components/Dropdown/LanguageDropdown.jsx index 2918a4e..e517651 100644 --- a/src/components/Dropdown/LanguageDropdown.jsx +++ b/src/components/Dropdown/LanguageDropdown.jsx @@ -11,14 +11,14 @@ const langMapping = { }; const LanguageDropdown = () => { - const [selectedLang, setSelectedLang] = useState(); + const [selectedLang, setSelectedLang] = useState("Language"); // Default text const { i18n } = useTranslation(); useEffect(() => { const savedLang = i18n.language; if (savedLang) { const langName = Object.keys(langMapping).find(key => langMapping[key] === savedLang); - setSelectedLang(langName); + setSelectedLang(langName || "Language"); // Fallback to "Language" if no match } }, [i18n.language]); @@ -31,18 +31,20 @@ const LanguageDropdown = () => { return ( +
- {selectedLang} + {selectedLang}
} - buttonClassName="flex items-center space-x-1 text-base font-normal text-black min-w-fit pl-3 pr-4 py-2 sm:px-3 sm:py-2" + buttonClassName="flex items-center justify-center w-full text-base font-normal text-black min-w-fit px-4 py-2 sm:px-5 sm:py-3 rounded-lg bg-white" > - {/* drop down links */} + {/* Dropdown options */} {Object.keys(langMapping).map((lang) => ( + {/* Login Link */} +

+ + Already have an account? + +

- + ); }; -export default Welcome; +export default Welcome; \ No newline at end of file