feat: improve admin panel design (#14464)

This commit is contained in:
DarkSky
2026-02-17 17:40:29 +08:00
committed by GitHub
parent 850e646ab9
commit 8f833388eb
86 changed files with 2633 additions and 1431 deletions
@@ -18,6 +18,10 @@ export const ViewRoot = ({
routes: RouteObject[];
}) => {
const viewRouter = useMemo(() => createMemoryRouter(routes), [routes]);
const routeContextValue = useMemo(
() => ({ outlet: null, matches: [], isDataRoute: false }),
[]
);
const location = useLiveData(view.location$);
@@ -31,13 +35,7 @@ export const ViewRoot = ({
return (
<FrameworkScope scope={view.scope}>
<UNSAFE_LocationContext.Provider value={null as any}>
<UNSAFE_RouteContext.Provider
value={{
outlet: null,
matches: [],
isDataRoute: false,
}}
>
<UNSAFE_RouteContext.Provider value={routeContextValue}>
<RouterProvider router={viewRouter} />
</UNSAFE_RouteContext.Provider>
</UNSAFE_LocationContext.Provider>