Skip to content
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

Merged
merged 1 commit into from Aug 9, 2023
Merged

Move MFP to separate site #30

merged 1 commit into from Aug 9, 2023

Conversation

norbye
Copy link
Member

@norbye norbye commented Aug 9, 2023

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

  • 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

* 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
@vercel
Copy link

vercel bot commented Aug 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nyiabakus ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 9, 2023 9:43pm

Comment on lines +35 to +53
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;
}
Copy link
Member Author

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

Copy link
Member

@ivarnakken ivarnakken left a 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! 🏅

@norbye norbye merged commit c0e33ee into master Aug 9, 2023
2 checks passed
@norbye norbye deleted the separate-mfp-site branch August 9, 2023 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants