diff --git a/src/access.ts b/src/access.ts index 72e96dc..bdd46dd 100644 --- a/src/access.ts +++ b/src/access.ts @@ -1,7 +1,7 @@ /** * @see https://umijs.org/docs/max/access#access * */ -export default function access(initialState: { currentUser?: API.CurrentUser } | undefined) { +export default function access(initialState: { currentUser?: API.MatrixAdmin } | undefined) { const { currentUser } = initialState ?? {}; let data = { canAdmin: currentUser && currentUser.role && currentUser.role < 3 diff --git a/src/app.tsx b/src/app.tsx index 2dceb17..d7aed74 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -1,4 +1,4 @@ -import { AvatarDropdown, AvatarName, Footer, Question, SelectLang } from '@/components'; +import { AvatarDropdown, AvatarName, Question, SelectLang } from '@/components'; import { current } from '@/services/matrix/admin'; import { LinkOutlined } from '@ant-design/icons'; import { SettingDrawer } from '@ant-design/pro-components'; @@ -94,7 +94,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) = links: isDev ? [ - + OpenAPI 文档 , ]