fix: daily buffer in getServerSideProps (#15093)

This commit is contained in:
Udit Takkar
2024-05-20 12:52:38 +01:00
committed by GitHub
parent 124471ef4a
commit 615a89737d
@@ -81,9 +81,9 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
).profile
: null;
//daily.co calls have a 60 minute exit buffer when a user enters a call when it's not available it will trigger the modals
//daily.co calls have a 14 days exit buffer when a user enters a call when it's not available it will trigger the modals
const now = new Date();
const exitDate = new Date(now.getTime() - 60 * 60 * 1000);
const exitDate = new Date(now.getTime() - 14 * 24 * 60 * 60 * 1000);
//find out if the meeting is in the past
const isPast = booking?.endTime <= exitDate;