create 24 hours array like 00:00 to 23:30
import moment from 'moment';
export const getTimesArray = () => {
const hours = Array.from({
length: 48
}, (_, hour) => moment({
hour: Math.floor(hour / 2),
minutes: (hour % 2 === 0 ? 0 : 30)
}).format('HH:mm')
);
return hours;
}