import { useTheme } from "@mui/material/styles"; import { useDispatch, useSelector } from "react-redux"; import { setMode } from "@/Features/UI/uiSlice.js"; import { useTranslation } from "react-i18next"; import IconButton from "@mui/material/IconButton"; const SunAndMoonIcon = () => { const theme = useTheme(); return ( ); }; export const ThemeSwitch = ({ width = 48, height = 48, }: { width?: number; height?: number; }) => { const mode = useSelector((state: any) => state.ui.mode); const dispatch = useDispatch(); const { t } = useTranslation(); const handleChange = () => { dispatch(setMode(mode === "light" ? "dark" : "light")); }; return ( ); };