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
Stop event editor from breaking in dev #3665
Stop event editor from breaking in dev #3665
Conversation
ABA-323 Not possible to edit events in dev
kinda possible, if you wait a couple of seconds … very weird behaviour |
2708347
to
c902c63
Compare
There was problems with storing non-serializble moment objects in the redux store. Issue is fixed by turning event dates into ISO strings.
c902c63
to
a144eed
Compare
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.
LGTM
@@ -208,7 +208,9 @@ export const selectUpcomingEvents = createSelector(selectEvents, (events) => | |||
events.filter((event) => event.isUsersUpcoming) | |||
); | |||
export const selectSortedEvents = createSelector(selectEvents, (events) => |
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.
This might be out of scope, but could it be possible to add some types to these functions, to make it easier to maintain in the future?
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.
nice!
Description
There was problems with storing non-serializable
moment
objects in the redux store. Issue is fixed by turning event dates into ISO strings.Multiple places used the dates directly as
moment
objects, which now needs to be wrapped in amoment()
function. This is the way it's done elsewhere in our codebase.Result
Screen.Recording.2023-03-11.at.18.08.29.mov
Testing
See video above.
More testing is needed, as I was experiencing some weird behaviour.
Pages will crash if you try to perform
moment
related functions on a string, so I need to make sure there's no such thing left.