This commit is contained in:
shafi54 2026-03-23 04:26:04 +05:30
parent 5ed889a34f
commit ea848992c9
2 changed files with 15 additions and 13 deletions

View file

@ -167,7 +167,9 @@ export default function CartPage({ isFlashDelivery = false }: CartPageProps) {
const getAvailableSlotsForProduct = React.useMemo(() => { const getAvailableSlotsForProduct = React.useMemo(() => {
return (productId: number) => { return (productId: number) => {
if (!slotsData || !slotsData[productId]) return []; 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 formatTimeRange = (deliveryTime: string) => {
const time = dayjs(deliveryTime); const time = dayjs(deliveryTime);
const endTime = time.add(1, 'hour'); const endTime = time.add(1, 'hour');
@ -303,9 +305,9 @@ export default function CartPage({ isFlashDelivery = false }: CartPageProps) {
if (!productSlots || productSlots.length === 0) return; if (!productSlots || productSlots.length === 0) return;
const now = dayjs(); const now = dayjs();
const upcomingSlots = productSlots.filter(slot => const upcomingSlots = productSlots
dayjs(slot.deliveryTime).isAfter(now) .filter((slot) => dayjs(slot.freezeTime).isAfter(now))
).sort((a, b) => .sort((a, b) =>
dayjs(a.deliveryTime).diff(dayjs(b.deliveryTime)) dayjs(a.deliveryTime).diff(dayjs(b.deliveryTime))
); );

View file

@ -64,9 +64,9 @@ const isDevMode = Constants.executionEnvironment !== "standalone";
// const BASE_API_URL = 'http://10.0.2.2:4000'; // 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.100.101:4000';
// const BASE_API_URL = 'http://192.168.1.5: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 = "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'; // let BASE_API_URL = 'http://192.168.29.176:4000';
// if(isDevMode) { // if(isDevMode) {