Skip to content

Commit

Permalink
styling tweak to correctly highlight i=0
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Apr 26, 2024
1 parent f40805b commit 64726be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions editor.planx.uk/src/pages/FlowEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ export const LastEdited = () => {
};

export const EditHistory = () => {
const [focusedOpIndex, setFocusedOpIndex] = useState<number | undefined>();
const [focusedOpIndex, setFocusedOpIndex] = useState<number | undefined>(
undefined,
);

const [flowId, flow, canUserEditTeam, undoOperation] = useStore((state) => [
state.id,
Expand Down Expand Up @@ -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`,
}}
Expand Down

0 comments on commit 64726be

Please sign in to comment.