Together-100Devs / Together

Together is a group calendar application using the MERN stack intended to bring discord communities closer!
https://together.cyclic.app/
MIT License
167 stars 112 forks source link

Events repeated longer than 30 days add twice in the second month. #401

Closed ChuckTheBoss closed 1 year ago

ChuckTheBoss commented 1 year ago

I created an event that repeats every Monday/Wednesday from Apr 6 - Jun 5. In the month of April, this event was added ONCE every Monday and Wednesday (correct; expected output) but in the months of May and June, each event was added TWICE (incorrect). Screenshot 2023-04-06 at 3 26 07 PM Screenshot 2023-04-06 at 3 26 19 PM

Caleb-Cohen commented 1 year ago

Oof, good catch! Thanks for pointing that out! While not ideal, you do have the ability to delete single events, until we can get a fix pushed.

romanstetsyk commented 1 year ago

Nice catch! This happens because when a recurring event is created, it is added to the database and to the state in React. When you switch to the next month, the same event is added to the state again. I think I know how to fix it. @Caleb-Cohen should I create a new discussion or submit a pr directly?

Caleb-Cohen commented 1 year ago

Nice catch! This happens because when a recurring event is created, it is added to the database and to the state in React. When you switch to the next month, the same event is added to the state again. I think I know how to fix it. @Caleb-Cohen should I create a new discussion or submit a pr directly?

What would the discussion accomplish on this? PR sounds fine, depending on the previous question.