Skip to content

Commit

Permalink
Fix: seat status color update
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 committed Apr 7, 2024
1 parent 118d88f commit fccb253
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/workspace/elements/seat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const Seat: React.FC<ISeatProps> = forwardRef(
if (ref.current) {
const seat = d3Extended.select(ref.current);
const seatLabel = d3Extended.selectById(`${id}-label`);
const status = seat.attr(dataAttributes.status);
if (status === SeatStatus.Unavailable || status === SeatStatus.Reserved || status === SeatStatus.Locked) {
seat.style("color", consumerSeatStatusColors?.[status]?.background ?? seatStatusColors[status].background);
seatLabel?.style("stroke", consumerSeatStatusColors?.[status]?.label ?? seatStatusColors[status].label);
Expand All @@ -63,7 +62,7 @@ const Seat: React.FC<ISeatProps> = forwardRef(
}
}
}
}, [ref, categoryObject]);
}, [ref, categoryObject, status]);

const localOnClick = (e) => {
onClick(e);
Expand Down

0 comments on commit fccb253

Please sign in to comment.