New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move MFP to separate site #30
Conversation
* Add blacklists for events for FP and MFP * Display DayDescriptions before events have been loaded * Separate schemas for DayDescription for FP and MFP * Add sorting of DayDescriptions in Sanity
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fcde0ae
to
b77f2bd
Compare
b77f2bd
to
ad77b7a
Compare
ad77b7a
to
a7dd6b5
Compare
let firstDate: Date; | ||
let lastDate: Date; | ||
if (events.length === 0) { | ||
firstDate = new Date(dayDescriptions[0].date); | ||
lastDate = new Date(dayDescriptions[dayDescriptions.length - 1].date); | ||
} else if (dayDescriptions.length === 0) { | ||
firstDate = events[0].startTime; | ||
lastDate = events[events.length - 1].startTime; | ||
} else { | ||
firstDate = | ||
new Date(dayDescriptions[0].date) < events[0].startTime | ||
? new Date(dayDescriptions[0].date) | ||
: events[0].startTime; | ||
lastDate = | ||
new Date(dayDescriptions[dayDescriptions.length - 1].date) > | ||
events[events.length - 1].startTime | ||
? new Date(dayDescriptions[dayDescriptions.length - 1].date) | ||
: events[events.length - 1].startTime; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is trash, but I don't have the time to fix it up rn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to separate
You're doing a lot of great work here! 🏅
It felt a bit misleading to have all the daydescriptions on the same site - as I do not think they share all the events from abakus.no, so I moved them over to a separate site.
Did a quick guess to see what events should and should not be in MFP, but I'll ask the MFP gang to verify later.
Heaps of duplicate code in the new materfadderperioden file, but it can be refactored later
Changes