Skip to content

Commit

Permalink
fix conditioning for machine status
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiabeluli committed Sep 5, 2024
1 parent 094dfd5 commit 18e90fe
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/app/src/features/MachineStatus/MachineStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,21 @@ const MachineStatus: React.FC<MachineStatusProps> = ({ activeState, alarmCode, i
isConnected && activeState ? (
<>
{
// activeState === GRBL_ACTIVE_STATE_ALARM ? (
<div className="flex w-full flex-row justify-center align-middle items-center font-light text-3xl mb-1">
<div className="flex justify-center">{activeState}</div>
<div className="absolute right-3 flex float-right"><AlarmDescriptionIcon code={alarmCode} /></div>
</div>
// ) : (
// <span className="flex w-full font-light text-3xl mb-1 justify-center">{message[activeState]}</span>
// )
activeState === GRBL_ACTIVE_STATE_ALARM ? (
<div className="flex w-full flex-row justify-center align-middle items-center font-light text-3xl mb-1">
<div className="flex justify-center">{activeState}</div>
<div className="absolute right-3 flex float-right"><AlarmDescriptionIcon code={alarmCode} /></div>
</div>
) : (
<span className="flex w-full font-light text-3xl mb-1 justify-center">{message[activeState]}</span>
)
}
</>
) : <h1 className="flex w-full font-light text-3xl mb-1 justify-center">Disconnected</h1>
}
</div>
<div className="mt-4">
<UnlockButton onClick={unlock} alarmCode={alarmCode} activeState={activeState} />
{ (activeState === GRBL_ACTIVE_STATE_ALARM || activeState === GRBL_ACTIVE_STATE_HOLD) && <UnlockButton onClick={unlock} alarmCode={alarmCode} activeState={activeState} />}
</div>
</div>
)
Expand Down

0 comments on commit 18e90fe

Please sign in to comment.