fix(csms): fix lint errors, clean up imports and improve code formatting
This commit is contained in:
@@ -185,7 +185,7 @@ export default function ChargePointDetailPage({ params }: { params: Promise<{ id
|
||||
dayjs().diff(dayjs(cp.lastHeartbeatAt), "second") < (cp.heartbeatInterval ?? 60) * 3;
|
||||
const commandChannelUnavailable = cp?.transportStatus === "unavailable";
|
||||
const statusLabel = isOnline ? "在线" : commandChannelUnavailable ? "通道异常" : "离线";
|
||||
const statusDotClass = isOnline
|
||||
const transportStatusDotClass = isOnline
|
||||
? "bg-success animate-pulse"
|
||||
: commandChannelUnavailable
|
||||
? "bg-warning"
|
||||
@@ -253,7 +253,7 @@ export default function ChargePointDetailPage({ params }: { params: Promise<{ id
|
||||
</Chip>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<span
|
||||
className={`size-2 rounded-full ${statusDotClass}`}
|
||||
className={`size-2 rounded-full ${transportStatusDotClass}`}
|
||||
/>
|
||||
<span className="text-xs text-muted">{statusLabel}</span>
|
||||
</div>
|
||||
@@ -445,7 +445,7 @@ export default function ChargePointDetailPage({ params }: { params: Promise<{ id
|
||||
<dd>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<span
|
||||
className={`size-2 rounded-full ${statusDotClass}`}
|
||||
className={`size-2 rounded-full ${transportStatusDotClass}`}
|
||||
/>
|
||||
<span className="text-sm text-foreground">{statusLabel}</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user