|  |  |  | 
|---|
|  |  |  | import { useStore, useTranslate, ToggleThemeButton } from 'react-admin'; | 
|---|
|  |  |  | import { IconButton, Menu, MenuItem, Tooltip } from '@mui/material'; | 
|---|
|  |  |  | import ColorLensIcon from '@mui/icons-material/ColorLens'; | 
|---|
|  |  |  | import { DEFAULT_THEME_NAME } from '@/config/setting'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import { themes } from './themes'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | setAnchorEl(null); | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const [themeName, setThemeName] = useStore('themeName', 'soft'); | 
|---|
|  |  |  | const [themeName, setThemeName] = useStore('themeName', DEFAULT_THEME_NAME); | 
|---|
|  |  |  | const handleChange = (_, index) => { | 
|---|
|  |  |  | const newTheme = themes[index]; | 
|---|
|  |  |  | setThemeName(newTheme.name); | 
|---|