mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 18:16:15 +08:00
feat: improve admin panel design (#14464)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user