From c415da682615f942f12e8d0b9ac7ac062e63955e Mon Sep 17 00:00:00 2001 From: Mohammad Alaskandarani Date: Tue, 20 Feb 2024 15:29:36 +0300 Subject: [PATCH] Fix package name and app name replacement --- src/components/common/Diff/Diff.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/common/Diff/Diff.tsx b/src/components/common/Diff/Diff.tsx index 018af59e..5d8740b4 100644 --- a/src/components/common/Diff/Diff.tsx +++ b/src/components/common/Diff/Diff.tsx @@ -272,13 +272,17 @@ const Diff = ({ toVersion, }) - const updatedHunks = React.useMemo(() => getHunksWithAppName(hunks), [hunks]) + const updatedHunks = React.useMemo( + () => getHunksWithAppName(hunks), + [hunks, getHunksWithAppName] + ) + const tokens: HunkTokens = React.useMemo( () => - tokenize(hunks, { + tokenize(updatedHunks, { enhancers: [markEdits(updatedHunks)], }), - [hunks, updatedHunks] + [updatedHunks] ) return (