From 9e5d1c61fbeec87fb463d7806220a2ab73a7cb72 Mon Sep 17 00:00:00 2001 From: lillian-tran Date: Mon, 9 Dec 2024 00:25:49 -0500 Subject: [PATCH 1/2] 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 From b0e0753422650cadec745730a258d3b2fe6eb6d9 Mon Sep 17 00:00:00 2001 From: myix765 Date: Wed, 11 Dec 2024 18:58:54 -0500 Subject: [PATCH 2/2] small style changes --- src/App.jsx | 4 +++- src/components/Dropdown/Dropdown.jsx | 4 ++-- src/components/Dropdown/LanguageDropdown.jsx | 8 ++++---- src/index.css | 6 ++++++ src/pages/Welcome.jsx | 2 +- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index f87a46d..1294122 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -21,7 +21,9 @@ const App = () => { return ( <>
- +
+ +
{isNew ? ( diff --git a/src/components/Dropdown/Dropdown.jsx b/src/components/Dropdown/Dropdown.jsx index 058797f..cde490d 100644 --- a/src/components/Dropdown/Dropdown.jsx +++ b/src/components/Dropdown/Dropdown.jsx @@ -26,7 +26,7 @@ const Dropdown = ({ label, children, buttonClassName = "dropdown-button text-rig
{/* dropdown button */} {/* dropdown */} {isOpen && ( -
+
{children}
diff --git a/src/components/Dropdown/LanguageDropdown.jsx b/src/components/Dropdown/LanguageDropdown.jsx index e517651..5522a2d 100644 --- a/src/components/Dropdown/LanguageDropdown.jsx +++ b/src/components/Dropdown/LanguageDropdown.jsx @@ -31,8 +31,8 @@ const LanguageDropdown = () => { return ( - +
+ {selectedLang}
} @@ -43,8 +43,8 @@ const LanguageDropdown = () => {