Skip to content

Commit

Permalink
Fix Alert icon always displaying
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyula Kiri committed Apr 12, 2024
1 parent 944bd65 commit 99aa6dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/client/src/components/widgets/departures/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ interface FieldProps {

export function Field({ departure }: FieldProps) {
const { tile } = useColorsOfScheme();
console.log(departure.alert);
return (
<FieldWrapper backgroundColor={tile}>
<LineElement>
<VehicleIcon name={departure.style.vehicleIcon.name} />
<LineNumber circle={departure.style.icon.type !== 'BOX'} backgroundColor={departure.style.color}>
<LineText color={departure.style.icon.textColor}>{departure.style.icon.text}</LineText>
</LineNumber>
{departure.alert && <FiAlertCircle size={40} color='orange' />}
{departure.alert.length > 1 && <FiAlertCircle size={40} color='orange' />}
</LineElement>
<DestinationElement>
<DestinationText>{departure.headsign}</DestinationText>
Expand Down

0 comments on commit 99aa6dc

Please sign in to comment.