diff --git a/components/Navbar.tsx b/components/Navbar.tsx index fb3678ea..d4fbbdbc 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -26,12 +26,12 @@ export default function Navbar() { const { width } = useWindowDimensions(); const handleToggle = () => { - if (settings.theme === "dark") { - updateSettings({ theme: "light" }); - } else { - updateSettings({ theme: "dark" }); - } + const [colorTheme, mode] = (settings.theme || "default-light").split('-'); + const newMode = mode === "dark" ? "light" : "dark"; + const newTheme = `${colorTheme}-${newMode}`; + updateSettings({ theme: newTheme }); }; + useEffect(() => { setSidebar(false); @@ -135,16 +135,16 @@ export default function Navbar() {
- View Your Recently Added Links Here! -
-- This section will view your latest added Links across every - Collections you have access to. -
- -Import From
+ {links[0] ? ( ++ View Your Recently Added Links Here! +
++ This section will view your latest added Links across every + Collections you have access to. +
-Import From
+- Pin Your Favorite Links Here! -
-- You can Pin your favorite Links by clicking on the three dots on - each Link and clicking{" "} - Pin to Dashboard. -
+ {links.some((e) => e.pinnedBy && e.pinnedBy[0]) ? ( ++ Pin Your Favorite Links Here! +
++ You can Pin your favorite Links by clicking on the three dots on + each Link and clicking{" "} + Pin to Dashboard. +
+Appearance
+ // Update the theme state + setTheme(newTheme); + }; - -Select Theme
-Dark
- {/*Appearance
+ + +Select Mode
+Light
- {/*Select Color Theme
+