fix(admin): organize admin panel (#7840)

This commit is contained in:
forehalo
2024-08-13 05:45:02 +00:00
parent 6dea831d8a
commit 0ec1995add
45 changed files with 746 additions and 955 deletions

View File

@@ -0,0 +1,21 @@
import { useQueryImmutable } from '@affine/core/hooks/use-query';
import {
adminServerConfigQuery,
getCurrentUserFeaturesQuery,
} from '@affine/graphql';
export const useServerConfig = () => {
const { data } = useQueryImmutable({
query: adminServerConfigQuery,
});
return data.serverConfig;
};
export const useCurrentUser = () => {
const { data } = useQueryImmutable({
query: getCurrentUserFeaturesQuery,
});
return data.currentUser;
};