feat(core): adjust guard service support loading state (#10989)

This commit is contained in:
EYHN
2025-03-20 10:53:41 +08:00
committed by GitHub
parent b88e7f0e35
commit 55cb4dc5e7
4 changed files with 11 additions and 9 deletions
@@ -75,7 +75,7 @@ const PropertyItem = ({
() => ({
canDrop(data) {
return (
canEditPropertyInfo &&
!!canEditPropertyInfo &&
data.source.data.entity?.type === 'custom-property' &&
data.source.data.from?.at === 'doc-property:manager' &&
data.source.data.from?.workspaceId ===
@@ -12,7 +12,7 @@ export const DocPermissionGuard = ({
}: {
docId: string;
permission: DocPermissionActions;
children: (can: boolean) => React.ReactNode;
children: (can: boolean | undefined) => React.ReactNode;
}) => {
const guardService = useService(GuardService);
const can = useLiveData(guardService.can$(permission, docId));