mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 09:31:55 +08:00
chore: auto-fix linting and formatting issues
This commit is contained in:
parent
68e10f5eaa
commit
c205626324
13
src/App.tsx
13
src/App.tsx
@ -1,7 +1,8 @@
|
||||
import { useQuery } from "@tanstack/react-query"
|
||||
import React, { useCallback,useEffect } from "react"
|
||||
import React, { useCallback, useEffect } from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { Route, BrowserRouter as Router, Routes } from "react-router-dom"
|
||||
|
||||
import Footer from "./components/Footer"
|
||||
import Header from "./components/Header"
|
||||
import { fetchSetting } from "./lib/nezha-api"
|
||||
@ -55,10 +56,10 @@ const App: React.FC = () => {
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
if (settingData?.data?.custom_code) {
|
||||
InjectContext(settingData?.data?.custom_code)
|
||||
}
|
||||
},[settingData?.data?.custom_code])
|
||||
if (settingData?.data?.custom_code) {
|
||||
InjectContext(settingData?.data?.custom_code)
|
||||
}
|
||||
}, [settingData?.data?.custom_code])
|
||||
|
||||
if (error) {
|
||||
return <ErrorPage code={500} message={error.message} />
|
||||
@ -72,8 +73,6 @@ const App: React.FC = () => {
|
||||
i18n.changeLanguage(settingData?.data?.language)
|
||||
}
|
||||
|
||||
|
||||
|
||||
const customBackgroundImage =
|
||||
// @ts-expect-error ShowNetTransfer is a global variable
|
||||
(window.CustomBackgroundImage as string) !== "" ? window.CustomBackgroundImage : undefined
|
||||
|
Loading…
x
Reference in New Issue
Block a user