mirror of
https://github.com/harivansh-afk/React-Portfolio.git
synced 2026-04-17 11:04:58 +00:00
chore: dark mode default
This commit is contained in:
parent
fb5b992b17
commit
6d17375685
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ import { WiMoonAltWaningCrescent4 } from "react-icons/wi";
|
|||
|
||||
|
||||
const Themetoggle = () => {
|
||||
const [theme, settheme] = useState(localStorage.getItem("theme"));
|
||||
const [theme, settheme] = useState(localStorage.getItem("theme") || "dark");
|
||||
const themetoggle = () => {
|
||||
settheme(theme === "dark" ? "light" : "dark");
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue