From acb998f4157be463863aa9e2315bab6829d9ae59 Mon Sep 17 00:00:00 2001 From: nili Date: Wed, 27 Mar 2024 10:37:56 +0800 Subject: [PATCH] fx --- src/access.ts | 2 +- src/app.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 文档 , ]