feat: cleanup

This commit is contained in:
Peter Carl Pardo
2024-12-15 23:50:48 +08:00
parent 80dee67c08
commit dd488fecb4
+1 -15
View File
@@ -1,8 +1,7 @@
import React, { useEffect, useState } from "react";
// import "./index.css";
import "./index.css";
import { IconButton } from "@mui/material";
import SunAndMoonIcon from "./SunAndMoonIcon";
// import SunAndMoonIcon from "./SunAndMoonIcon";
const ThemeSwitch = () => {
const [currentTheme, setCurrentTheme] = useState("light");
@@ -11,7 +10,6 @@ const ThemeSwitch = () => {
useEffect(() => {
document.body.setAttribute("data-theme", currentTheme);
console.log(currentTheme);
}, [currentTheme]);
return (
@@ -27,18 +25,6 @@ const ThemeSwitch = () => {
display: "flex",
alignItems: "center",
justifyContent: "center",
// "& .sun-and-moon": {
// transformOrigin: "center",
// },
// "& .sun": {
// fill: "var(--icon-fill)",
// transition: "transform 0.5s ease",
// ...(currentTheme === "dark" && { transform: "scale(1.75)" }),
// },
// "& .moon > circle": {
// transform: currentTheme === "dark" ? "translateX(-7px)" : "none",
// transition: "transform 0.25s ease",
// },
}}
>
<SunAndMoonIcon />