🐛 Time to wait shall be displayed in 2 digits
This commit is contained in:
@@ -74,7 +74,7 @@ const TtwPassage: VoidComponent<{
|
||||
|
||||
const refTs = passage !== undefined ? (passage.expectedDepartTs !== null ? passage.expectedDepartTs : passage.expectedArrivalTs) : 0;
|
||||
const ttwSec = refTs - (getTime(dateNow()) / 1000);
|
||||
const ttwRepr = ttwSec < 3600 ? `${Math.floor(ttwSec / 60)} min` : format(refTs * 1000, "HH:mm");
|
||||
const ttwRepr = ttwSec < 3600 ? `${Math.floor(ttwSec / 60).toString().padStart(2, "0")} min` : format(refTs * 1000, "HH:mm");
|
||||
const isApproaching = ttwSec <= 60;
|
||||
|
||||
const text = <svg class={styles.passage} viewBox={`0 0 215 ${props.fontSize}`}>
|
||||
|
Reference in New Issue
Block a user