feat: #1000 ready to support client-side only

This commit is contained in:
Yidadaa
2023-06-14 00:37:42 +08:00
parent e6b49a60c0
commit 50cd33dbb2
13 changed files with 133 additions and 36 deletions

View File

@@ -24,6 +24,7 @@ import {
import { SideBar } from "./sidebar";
import { useAppConfig } from "../store/config";
import { AuthPage } from "./auth";
import { getClientConfig } from "../config/client";
export function Loading(props: { noLogo?: boolean }) {
return (
@@ -147,6 +148,10 @@ function Screen() {
export function Home() {
useSwitchTheme();
useEffect(() => {
console.log("[Config] got config from build time", getClientConfig());
}, []);
if (!useHasHydrated()) {
return <Loading />;
}