This commit is contained in:
tangly1024
2023-07-07 21:37:54 +08:00
parent 8508dfaf45
commit e1808dd608
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ const DebugPanel = () => {
const [siteConfig, updateSiteConfig] = useState({})
// 主题下拉框
const themeOptions = THEMES.map(t => ({ value: t, text: t }))
const themeOptions = THEMES?.map(t => ({ value: t, text: t }))
useEffect(() => {
updateSiteConfig(Object.assign({}, BLOG))

View File

@@ -25,7 +25,7 @@ const ThemeSwitch = () => {
<div id="draggableBox" style={{ left: '10px', top: '85vh' }} className="fixed text-white bg-black z-50 rounded-lg shadow-card">
<div className="py-2 flex items-center text-sm px-2">
<select value={theme} onChange={onSelectChange} name="cars" className='text-white bg-black uppercase cursor-pointer'>
{THEMES.map(t => {
{THEMES?.map(t => {
return <option key={t} value={t}>{t}</option>
})}
</select>