Skip to content

Commit 6175744

Browse files
committed
fix(hooks): remove postCid requirement from isAccountCommentAuthor check
1 parent 26278f9 commit 6175744

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hooks/use-author-privileges.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ const useAuthorPrivileges = ({ commentAuthorAddress, subplebbitAddress, postCid
1919
const accountAuthorRole = roles?.[accountAuthorAddress]?.role;
2020
const isAccountMod = accountAuthorRole === 'admin' || accountAuthorRole === 'owner' || accountAuthorRole === 'moderator';
2121

22-
const isAccountCommentAuthor = !!postCid && accountAuthorAddress === commentAuthorAddress;
22+
const isAccountCommentAuthor = accountAuthorAddress === commentAuthorAddress;
2323

2424
return { isCommentAuthorMod, isAccountMod, isAccountCommentAuthor, commentAuthorRole, accountAuthorRole };
25-
}, [roles, commentAuthorAddress, accountAuthorAddress, postCid]);
25+
}, [roles, commentAuthorAddress, accountAuthorAddress]);
2626

2727
return { isCommentAuthorMod, isAccountMod, isAccountCommentAuthor, commentAuthorRole, accountAuthorRole };
2828
};

0 commit comments

Comments
 (0)