Skip to content

Commit

Permalink
fix: typo & render error
Browse files Browse the repository at this point in the history
  • Loading branch information
naiba committed Dec 17, 2024
1 parent 5910c52 commit f16069f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/routes/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ export default function Root() {

useEffect(() => {
document.title = settingData?.site_name || "哪吒监控 Nezha Monitoring"
}, [settingData])
}, [settingData?.site_name])

useEffect(() => {
if (settingData?.custom_code_dashboard) {
InjectContext(settingData?.custom_code_dashboard)
}
}, [settingData?.custom_code_dashboard])

if (error) {
throw error
Expand All @@ -28,12 +34,6 @@ export default function Root() {
i18n.changeLanguage(settingData?.language)
}

useEffect(() => {
if (settingData?.custom_code_dashboard) {
InjectContext(settingData?.custom_code)
}
}, [settingData?.custom_code_dashboard])

return (
<ThemeProvider defaultTheme="system" storageKey="vite-ui-theme">
<section className="text-sm mx-auto h-full flex flex-col justify-between">
Expand Down

0 comments on commit f16069f

Please sign in to comment.