enh
This commit is contained in:
parent
5ed889a34f
commit
ea848992c9
2 changed files with 15 additions and 13 deletions
|
|
@ -167,7 +167,9 @@ export default function CartPage({ isFlashDelivery = false }: CartPageProps) {
|
|||
const getAvailableSlotsForProduct = React.useMemo(() => {
|
||||
return (productId: number) => {
|
||||
if (!slotsData || !slotsData[productId]) return [];
|
||||
return slotsData[productId].map((slot) => {
|
||||
return slotsData[productId]
|
||||
.filter((slot) => dayjs(slot.freezeTime).isAfter(dayjs()))
|
||||
.map((slot) => {
|
||||
const formatTimeRange = (deliveryTime: string) => {
|
||||
const time = dayjs(deliveryTime);
|
||||
const endTime = time.add(1, 'hour');
|
||||
|
|
@ -303,9 +305,9 @@ export default function CartPage({ isFlashDelivery = false }: CartPageProps) {
|
|||
if (!productSlots || productSlots.length === 0) return;
|
||||
|
||||
const now = dayjs();
|
||||
const upcomingSlots = productSlots.filter(slot =>
|
||||
dayjs(slot.deliveryTime).isAfter(now)
|
||||
).sort((a, b) =>
|
||||
const upcomingSlots = productSlots
|
||||
.filter((slot) => dayjs(slot.freezeTime).isAfter(now))
|
||||
.sort((a, b) =>
|
||||
dayjs(a.deliveryTime).diff(dayjs(b.deliveryTime))
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ const isDevMode = Constants.executionEnvironment !== "standalone";
|
|||
// const BASE_API_URL = 'http://10.0.2.2:4000';
|
||||
// const BASE_API_URL = 'http://192.168.100.101:4000';
|
||||
// const BASE_API_URL = 'http://192.168.1.5:4000';
|
||||
let BASE_API_URL = "https://mf.freshyo.in";
|
||||
let BASE_API_URL = "https://raw.freshyo.in";
|
||||
// let BASE_API_URL = "https://freshyo.technocracy.ovh";
|
||||
// let BASE_API_URL = 'http://192.168.100.107:4000';
|
||||
// let BASE_API_URL = 'http://192.168.100.108:4000';
|
||||
// let BASE_API_URL = 'http://192.168.29.176:4000';
|
||||
|
||||
// if(isDevMode) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue