mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(codebase audit): preserve cleanup without regressions
Fix codebase audit regressions while preserving UI/UX behavior and adding review-driven hardening.
This commit is contained in:
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
|
||||
import { Comment } from '@bitsocial/bitsocial-react-hooks';
|
||||
import { flattenCommentsPages } from '@bitsocial/bitsocial-react-hooks/dist/lib/utils';
|
||||
|
||||
const useCountLinksInReplies = (comment: Comment, firstXReplies?: number) => {
|
||||
const useCountLinksInReplies = (comment: Comment | undefined, firstXReplies?: number) => {
|
||||
let linkCount = 0;
|
||||
const flattenedReplies = useMemo(() => flattenCommentsPages(comment?.replies), [comment?.replies]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user