mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 22:47:15 +01:00
prettier all the things
This commit is contained in:
@@ -14,23 +14,22 @@ export type ServerSideRecentBooking = {
|
||||
}
|
||||
}
|
||||
|
||||
export const getServerSideRecentBookings = async (): Promise<
|
||||
ServerSideRecentBooking
|
||||
> => {
|
||||
const bookings = await getBookings({
|
||||
startDateGreaterThan: startOfYear(nowInTz()).toISOString(),
|
||||
})
|
||||
export const getServerSideRecentBookings =
|
||||
async (): Promise<ServerSideRecentBooking> => {
|
||||
const bookings = await getBookings({
|
||||
startDateGreaterThan: startOfYear(nowInTz()).toISOString(),
|
||||
})
|
||||
|
||||
// TODO: hack, not sure why _id is not serilizable
|
||||
const bookingsJSON = JSON.parse(
|
||||
JSON.stringify(bookings.map((b) => b.toJSON()))
|
||||
) as object[]
|
||||
return {
|
||||
props: {
|
||||
bookings: bookingsJSON,
|
||||
},
|
||||
// TODO: hack, not sure why _id is not serilizable
|
||||
const bookingsJSON = JSON.parse(
|
||||
JSON.stringify(bookings.map((b) => b.toJSON()))
|
||||
) as object[]
|
||||
return {
|
||||
props: {
|
||||
bookings: bookingsJSON,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const getServerSideBooking = async (
|
||||
context: any
|
||||
|
||||
Reference in New Issue
Block a user