Skip to content

Conversation

@DylanDevelops
Copy link
Owner

This pull request introduces a new utility function to check if a user can increase their daily challenge streak and integrates this function into the Navbar component. The most important changes include adding the new function, modifying the Navbar component to use this function, and updating the imports accordingly.

New Utility Function:

  • hooks/use-daily-challenge-check.tsx: Added the canUserIncreaseStreak function to determine if a user can increase their streak based on the last time they played the daily challenge.

Integration in Navbar Component:

Can Increase Streak:
image

Can no longer increase streak:
image

@DylanDevelops DylanDevelops requested a review from Copilot April 10, 2025 06:09
Copy link
Contributor

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 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

components/navbar/navbar.tsx:111

  • The current condition applies the fill class when the user cannot increase their streak, which might be the inverse of the intended behavior based on the PR description. Please verify that the logic aligns with the desired visual indicator behavior.
!canUserIncreaseStreak(user.lastPlayTimestamp) ? "fill-[#1C0F13]" : ""

@DylanDevelops DylanDevelops merged commit 48d16ae into main Apr 10, 2025
4 checks passed
@DylanDevelops DylanDevelops deleted the streak-indicator branch April 10, 2025 06:11
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.

2 participants