diff --git a/src/App.tsx b/src/App.tsx index 02a5fda..0f8dffe 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,11 +6,9 @@ import { DashCommand } from "./components/DashCommand" import ErrorBoundary from "./components/ErrorBoundary" import Footer from "./components/Footer" import Header, { RefreshToast } from "./components/Header" -import { useBackground } from "./hooks/use-background" import { useTheme } from "./hooks/use-theme" import { InjectContext } from "./lib/inject" import { fetchSetting } from "./lib/nezha-api" -import { cn } from "./lib/utils" import ErrorPage from "./pages/ErrorPage" import NotFound from "./pages/NotFound" import Server from "./pages/Server" @@ -25,7 +23,6 @@ const App: React.FC = () => { }) const { setTheme } = useTheme() const [isCustomCodeInjected, setIsCustomCodeInjected] = useState(false) - const { backgroundImage: customBackgroundImage } = useBackground() useEffect(() => { if (settingData?.data?.config?.custom_code) { @@ -57,41 +54,31 @@ const App: React.FC = () => { return null } - const customMobileBackgroundImage = window.CustomMobileBackgroundImage !== "" ? window.CustomMobileBackgroundImage : undefined - return ( - {/* 固定定位的背景层 */} - {customBackgroundImage && ( +
+ {/* 固定定位的背景层 */}
- )} - {customMobileBackgroundImage && ( -
- )} -
-
+ +
- - } /> - } /> - } /> - } /> - +
+ + } /> + } /> + } /> + } /> + +