fix client book
This commit is contained in:
@@ -257,7 +257,7 @@ export default function BookClient({ language }: { language: PublicSiteLanguage
|
|||||||
const nextStart = !current.startDate || current.startDate < minStart ? minStart : current.startDate
|
const nextStart = !current.startDate || current.startDate < minStart ? minStart : current.startDate
|
||||||
const nextEnd = !current.endDate || current.endDate <= nextStart ? minEnd : current.endDate
|
const nextEnd = !current.endDate || current.endDate <= nextStart ? minEnd : current.endDate
|
||||||
if (nextStart === current.startDate && nextEnd === current.endDate) return current
|
if (nextStart === current.startDate && nextEnd === current.endDate) return current
|
||||||
return { startDate: nextStart, endDate: nextEnd }
|
return { ...current, startDate: nextStart, endDate: nextEnd }
|
||||||
})
|
})
|
||||||
}, [vehicle?.nextAvailableAt])
|
}, [vehicle?.nextAvailableAt])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user