mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
refactor: migrate 5chan to the community hooks API (#1073)
* refactor(community-api): migrate 5chan to community hooks * fix(review): address PR feedback * fix(review): preserve legacy board context fallbacks * fix(review): address latest bot feedback * fix(review): use communityAddress in edit menu privileges
This commit is contained in:
@@ -29,8 +29,9 @@ const PendingPost = () => {
|
||||
}, [isValidAccountCommentIndex, navigate]);
|
||||
|
||||
useEffect(() => {
|
||||
if (post?.cid && post?.subplebbitAddress) {
|
||||
const boardPath = getBoardPath(post.subplebbitAddress, directories);
|
||||
const postCommunityAddress = post?.communityAddress || post?.subplebbitAddress;
|
||||
if (post?.cid && postCommunityAddress) {
|
||||
const boardPath = getBoardPath(postCommunityAddress, directories);
|
||||
navigate(`/${boardPath}/thread/${post.cid}`, { replace: true });
|
||||
}
|
||||
}, [post, navigate, directories]);
|
||||
|
||||
Reference in New Issue
Block a user