✨ Feat(web): Add move to next/prev week/month shortcuts for someday event#559
Conversation
| event: Schema_Event, | ||
| ): Schema_Event => { | ||
| const reference = | ||
| to.direction === "current" ? dayjs(new Date()) : dayjs(event.startDate); |
There was a problem hiding this comment.
Just curious, why use dayjs(new Date()) instead of dayjs()?
There was a problem hiding this comment.
Uhhhh no particular reason, I guess I was used to it but now after reading your comment I realized that the latter is the better practice, thanks for the headsup
| }; | ||
| }; | ||
|
|
||
| export const setEventStartEndDates = ( |
There was a problem hiding this comment.
Let's add some unit tests for this, as I'm already seeing some bugs with its implementation
There was a problem hiding this comment.
For sure, but can you share what bugs did you stumble upon?
| }; | ||
| }; | ||
|
|
||
| export const setEventStartEndDates = ( |
There was a problem hiding this comment.
Can you rename this so it doesn't start with set.... Since this isn't changing any React state, I think we should stay away from set... as the first part of a function to avoid confusion
There was a problem hiding this comment.
Yes makes sense, thanks for pointing this out.
Description
Closes #526