fixed get theme hook error
This commit is contained in:
parent
1c3f088ea1
commit
bd852c083a
2 changed files with 18 additions and 12 deletions
|
|
@ -27,6 +27,7 @@ import { IconPicker } from "common/IconPicker";
|
|||
import { MuiTelInput } from "mui-tel-input";
|
||||
import { useThemeMode } from "theme/AppThemeProvider";
|
||||
import ContractsIcon from "products/CommonIcons/contractIcon";
|
||||
import { setThemeType } from "theme";
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) => {
|
||||
return ({
|
||||
|
|
@ -355,9 +356,10 @@ export default function UserSettings(props: Props) {
|
|||
return <IconPicker url={user.settings.avatar} setUrl={setAvatarUrl} id={user.settings.id} />;
|
||||
};
|
||||
|
||||
const handleChange = (event: React.MouseEvent<HTMLElement>, nextView: "light" | "dark" | "system") => {
|
||||
const handleChange = (event: React.MouseEvent<HTMLElement>, theme: "light" | "dark" | "system") => {
|
||||
event.preventDefault()
|
||||
themeMode.setMode(nextView)
|
||||
themeMode.setMode(theme)
|
||||
setThemeType(theme)
|
||||
};
|
||||
|
||||
const themeToggle = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue