From 64726be75e83eec9f928f5ebf1de0b82f9bed16e Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Fri, 26 Apr 2024 17:32:34 +0200 Subject: [PATCH] styling tweak to correctly highlight i=0 --- editor.planx.uk/src/pages/FlowEditor/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/editor.planx.uk/src/pages/FlowEditor/index.tsx b/editor.planx.uk/src/pages/FlowEditor/index.tsx index 2939ddb4f1..2dc22240b2 100644 --- a/editor.planx.uk/src/pages/FlowEditor/index.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/index.tsx @@ -111,7 +111,9 @@ export const LastEdited = () => { }; export const EditHistory = () => { - const [focusedOpIndex, setFocusedOpIndex] = useState(); + const [focusedOpIndex, setFocusedOpIndex] = useState( + undefined, + ); const [flowId, flow, canUserEditTeam, undoOperation] = useStore((state) => [ state.id, @@ -180,7 +182,7 @@ export const EditHistory = () => { sx={{ background: (theme) => theme.palette.grey[200], borderLeft: (theme) => - focusedOpIndex && i <= focusedOpIndex + focusedOpIndex !== undefined && i <= focusedOpIndex ? `5px solid ${theme.palette.primary.main}` : `none`, }}