fix: add useAdminSchemaUid (#2092)
Co-authored-by: chenos <chenlinxh@gmail.com>
This commit is contained in:
parent
daa48302df
commit
d7ed43b86d
@ -1,7 +1,7 @@
|
||||
import { Spin } from 'antd';
|
||||
import React, { createContext, useContext } from 'react';
|
||||
import { useRequest } from '../../api-client';
|
||||
import { useSystemSettings } from '../../system-settings';
|
||||
import { useAdminSchemaUid } from '../../hooks';
|
||||
|
||||
const MenuItemsContext = createContext(null);
|
||||
|
||||
|
@ -1 +1,2 @@
|
||||
export * from './useAdminSchemaUid';
|
||||
export * from './useViewport';
|
||||
|
6
packages/core/client/src/hooks/useAdminSchemaUid.ts
Normal file
6
packages/core/client/src/hooks/useAdminSchemaUid.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { useSystemSettings } from '../system-settings';
|
||||
|
||||
export const useAdminSchemaUid = () => {
|
||||
const ctx = useSystemSettings();
|
||||
return ctx?.data?.data?.options?.adminSchemaUid;
|
||||
};
|
@ -14,6 +14,7 @@ import {
|
||||
findByUid,
|
||||
findMenuItem,
|
||||
useACLRoleContext,
|
||||
useAdminSchemaUid,
|
||||
useDocumentTitle,
|
||||
useRequest,
|
||||
useSystemSettings,
|
||||
@ -54,11 +55,6 @@ const useMenuProps = () => {
|
||||
};
|
||||
};
|
||||
|
||||
const useAdminSchemaUid = () => {
|
||||
const ctx = useSystemSettings();
|
||||
return ctx?.data?.data?.options?.adminSchemaUid;
|
||||
};
|
||||
|
||||
const MenuEditor = (props) => {
|
||||
const { setTitle } = useDocumentTitle();
|
||||
const navigate = useNavigate();
|
||||
|
Loading…
Reference in New Issue
Block a user