Skip to content

Commit

Permalink
fix(core): edit button missing in shared page
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmFly committed Mar 29, 2024
1 parent c1eb7b6 commit 5648986
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button } from '@affine/component/ui/button';
import { useCurrentUser } from '@affine/core/hooks/affine/use-current-user';
import { useMemberCount } from '@affine/core/hooks/affine/use-member-count';
import { useMembers } from '@affine/core/hooks/affine/use-members';
import { useNavigateHelper } from '@affine/core/hooks/use-navigate-helper';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
Expand All @@ -14,7 +15,8 @@ export const AuthenticatedItem = ({
}: { setIsMember: (value: boolean) => void } & ShareHeaderRightItemProps) => {
const { workspaceId, pageId } = props;
const user = useCurrentUser();
const members = useMembers(workspaceId, 0);
const memberCount = useMemberCount(workspaceId);
const members = useMembers(workspaceId, 0, memberCount);
const isMember = members.some(m => m.id === user.id);
const t = useAFFiNEI18N();
const { jumpToPage } = useNavigateHelper();
Expand Down

0 comments on commit 5648986

Please sign in to comment.