refactor: simpler timing inputs
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
(h) => h.day_of_week === new Date().getDay()
|
||||
);
|
||||
if (!entry) return false;
|
||||
if (entry.is_24_7) return true;
|
||||
if (entry.open_today_status) return true;
|
||||
const openMin = toMinutes(entry.opens_at);
|
||||
let closeMin = toMinutes(entry.closes_at);
|
||||
// Treat midnight as end of day and handle overnight spans
|
||||
@@ -79,7 +79,7 @@
|
||||
(h) => h.day_of_week === new Date().getDay()
|
||||
);
|
||||
if (!entry) return false;
|
||||
if (entry.is_24_7) return true;
|
||||
if (entry.open_today_status) return true;
|
||||
const openMin = toMinutes(entry.opens_at);
|
||||
let closeMin = toMinutes(entry.closes_at);
|
||||
if (closeMin === 0) closeMin = 24 * 60;
|
||||
|
||||
Reference in New Issue
Block a user