@@ -8,7 +8,7 @@ import type {
88} from "@pierre/diffs" ;
99import type { CodeViewHandle } from "@pierre/diffs/react" ;
1010import type { ScopedThreadRef } from "@t3tools/contracts" ;
11- import { useCallback , useEffect , useMemo , useState , type ReactNode , type Ref } from "react" ;
11+ import { useEffect , useState , type ReactNode , type Ref } from "react" ;
1212
1313import { type DraftId , useComposerDraftStore } from "~/composerDraftStore" ;
1414import { fnv1a32 , resolveFileDiffPath , resolveFileDiffPreviousPath } from "~/lib/diffRendering" ;
@@ -202,8 +202,7 @@ export function AnnotatableCodeView({
202202 setDraftText ( "" ) ;
203203 setSelectedLines ( null ) ;
204204 }
205- const items = useMemo < CodeViewDiffItem < DiffCommentAnnotationGroup > [ ] > (
206- ( ) =>
205+ const items = ( ( ) : CodeViewDiffItem < DiffCommentAnnotationGroup > [ ] =>
207206 files . map ( ( { fileDiff, filePath, fileKey, fileVersion, collapsed } ) => {
208207 const persisted = reviewComments
209208 . filter (
@@ -223,8 +222,7 @@ export function AnnotatableCodeView({
223222 text : comment . text ,
224223 } ) ;
225224 } , [ ] ) ;
226- const annotations =
227- draft ?. fileKey === fileKey ? [ ...persisted , draft . annotation ] : persisted ;
225+ const annotations = draft ?. fileKey === fileKey ? [ ...persisted , draft . annotation ] : persisted ;
228226 if ( renderHunkAction ) {
229227 fileDiff . hunks . forEach ( ( hunk , hunkIndex ) => {
230228 const change = hunk . hunkContent . findLast ( ( content ) => content . type === "change" ) ;
@@ -263,9 +261,7 @@ export function AnnotatableCodeView({
263261 . join ( ":" ) } `,
264262 ) ,
265263 } ;
266- } ) ,
267- [ draft , files , reviewComments , sectionId , renderHunkAction ] ,
268- ) ;
264+ } ) ) ( ) ;
269265
270266 const removeEntry = ( entryId : string ) => {
271267 setSelectedLines ( null ) ;
0 commit comments