mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 18:16:15 +08:00
feat(core): adjust guard service support loading state (#10989)
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user