+
Writing on the internet
-
+
is changing. IYKYK
-
+
If You Know,
@@ -30,7 +30,7 @@ const Hero = () => {
-
+
You Know.
@@ -51,25 +51,25 @@ const Hero = () => {
-
-
+
+
Abbreve (A-bree-vay) is
{" "}
an open source dictionary{" "}
- for slang.{" "}
+ for slang.{" "}
-
+
Curated by the community, for the community.
-
+
+ className="text-deeppurple dark:text-purple">
Nate (DojoJOJO)
@Nateemerson
@@ -78,22 +78,22 @@ const Hero = () => {
Replying to{" "}
-
+
@DunsinWebDev and @njongemy
-
+
idk wtf ur on about... ICYMI IMHO RTFM, KISS, SHIT or GTFO.
18:31 . 07 Sep 22 .{" "}
-
+
{" "}
Twitter Web App
-
+
Reading shouldn't feel like work.
@@ -102,41 +102,41 @@ const Hero = () => {
-
+
-
+
Do you find yourself googling the meaning of slang like hmu, lgtm,
lfg etc ?
-
+
Always 😢
- 84.8%
+ 84.8%
-
+
Never 🙂
- 15.2%
+ 15.2%
18:11 . 07 Sep 22 .{" "}
-
+
{" "}
Twitter for Android
@@ -144,11 +144,11 @@ const Hero = () => {
-
- Googling in between
- conversations is{" "}
+
+ Googling in between
+ conversations is{" "}
fast becoming{" "}
- the new normal.
+ the new normal.
diff --git a/src/components/navbar.jsx b/src/components/navbar.jsx
index 8f8f12ce..775d5fa2 100644
--- a/src/components/navbar.jsx
+++ b/src/components/navbar.jsx
@@ -5,42 +5,25 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faMoon, faSun } from "@fortawesome/free-solid-svg-icons";
const Navbar = () => {
- const defaultTheme = localStorage.getItem("theme") || "light";
- const defaultToggle =
- JSON.parse(localStorage.getItem("toggleButton")) || false;
-
- const [theme, setTheme] = useState(defaultTheme);
- const [toggleTheme, setToggleTheme] = useState(defaultToggle);
-
+ const deafultTheme = localStorage.getItem("isDarkMode") || false;
+ const [isDarkMode, setIsDarkMode] = useState(deafultTheme);
const element = document.documentElement;
- const handletheme = () => {
- if (toggleTheme) {
- setTheme("dark");
- } else {
- setTheme("light");
- }
-
- setToggleTheme(!toggleTheme);
- };
useEffect(() => {
- switch (theme) {
- case "dark":
+ switch (isDarkMode) {
+ case true:
element.classList.add("dark");
- localStorage.setItem("theme", "dark");
- localStorage.setItem("toggleButton", JSON.stringify(false));
+ localStorage.setItem("isDarkMode", true);
break;
- case "light":
+ case false:
element.classList.remove("dark");
- localStorage.setItem("theme", "light");
- localStorage.setItem("toggleButton", JSON.stringify(true));
+ localStorage.setItem("isDarkMode", false);
break;
default:
- localStorage.removeItem("theme");
-
+ localStorage.removeItem("isDarkMode");
break;
}
- }, [theme]);
+ }, [isDarkMode]);
return (
@@ -82,5 +65,4 @@ const Navbar = () => {
);
};
-
export default Navbar;
is changing. IYKYK
+
If You Know,
+
You Know.
-
+
+
Abbreve (A-bree-vay) is
{" "}
an open source dictionary{" "}
- for slang.{" "}
+ for slang.{" "}
+
Curated by the community, for the community.
Nate (DojoJOJO)
@Nateemerson
@@ -78,22 +78,22 @@ const Hero = () => {Replying to{" "} - + @DunsinWebDev and @njongemy
-+
idk wtf ur on about... ICYMI IMHO RTFM, KISS, SHIT or GTFO.
18:31 . 07 Sep 22 .{" "} - + {" "} Twitter Web App
-Reading shouldn't feel like work.
@@ -102,41 +102,41 @@ const Hero = () => {+
Do you find yourself googling the meaning of slang like hmu, lgtm, lfg etc ?
Always 😢
84.8%
+84.8%
Never 🙂
15.2%
+15.2%
18:11 . 07 Sep 22 .{" "} - + {" "} Twitter for Android @@ -144,11 +144,11 @@ const Hero = () => {