Skip to content

Conversation

@christianhelp
Copy link
Contributor

Why

Currently, a lot of the date comparison logic inside of the event section is being done by functions we create instead of using the built-in libraries. Could lead to issue later on if not fixed.

What

Performed refactors and slight other enhancements to satisfy this

Satisfies

#80

@christianhelp christianhelp requested a review from Copilot April 7, 2025 19:22
@christianhelp christianhelp linked an issue Apr 7, 2025 that may be closed by this pull request
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

apps/web/src/lib/queries/charts.ts:202

  • Using a default value of 1 for currentMonthCount may artificially inflate the growth rate when there are no events in the current month; please verify that this logic reflects the intended behavior.
const currentMonthCount = currentMonthResult[0]?.count || 1;

apps/web/src/components/dash/admin/events/EditEventForm.tsx:133

  • Consider adding eventEndTime to the dependency array for accurate re-evaluation of the condition when editing event times.
useEffect(() => {

@christianhelp christianhelp merged commit 2f61b73 into dev Apr 7, 2025
2 checks passed
@christianhelp christianhelp deleted the 80-refactor-date-functions-to-use-date-fns-date-fns-tz branch April 11, 2025 18:48
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.

Refactor Date Functions to use date-fns /date-fns-tz

2 participants