From a0bc5805f8752869aafdee59303650f8dd8104f6 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Mon, 24 Mar 2025 22:08:14 +0100 Subject: [PATCH] Remove code duplication --- .../src/repos/diff/DiffFileTree.tsx | 61 +++++++------------ 1 file changed, 22 insertions(+), 39 deletions(-) diff --git a/scm-ui/ui-components/src/repos/diff/DiffFileTree.tsx b/scm-ui/ui-components/src/repos/diff/DiffFileTree.tsx index 3d71ba683c..b7e57346e7 100644 --- a/scm-ui/ui-components/src/repos/diff/DiffFileTree.tsx +++ b/scm-ui/ui-components/src/repos/diff/DiffFileTree.tsx @@ -149,45 +149,28 @@ const TreeFile: FC = ({ changeType, path, parentPath, currentFile, se return (
setCurrentFile(completePath)}> - {isCurrentFile() ? ( - - - file - - - {getIcon(changeType)} - - - ) : ( - - - file - - - {getIcon(changeType)} - - - )} + + + file + + + {getIcon(changeType)} + +
{path}
);