export const getTrainDelayStatus = (current, Station_JP) => { if (!current) return () => {}; const delay = current.delay; switch (true) { case delay === "入線": if (current.Pos === Station_JP) { return "当駅始発"; } else { return "発車前"; } case isNaN(delay): return delay; case delay === 0: return "定刻通り"; default: return delay + "分遅れ"; } };