Skip to content

Implemented useRef and Removed isHovering from useEffect Dependency#3955

Open
vishal1011001 wants to merge 1 commit into
JhaSourav07:mainfrom
vishal1011001:fix/3695-cursor-useEffect-trigger
Open

Implemented useRef and Removed isHovering from useEffect Dependency#3955
vishal1011001 wants to merge 1 commit into
JhaSourav07:mainfrom
vishal1011001:fix/3695-cursor-useEffect-trigger

Conversation

@vishal1011001
Copy link
Copy Markdown

Description

  • In the file, components/AnimatedCursor.tsx I made changes to fix the triggering of useEffect by the hover/un-hover of the animated cursor.
  • I implemented useRef for the cursor, along with that, created a helper function setHover and implemented those under useEffect.
  • Then Removed the isHovering from useEffect dependency array.

Fixes #3695

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

Animated cursor working correctly after changes:

Screenshot 2026-06-05 130400 Screenshot 2026-06-05 130335

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started the repo.
  • I have made sure that i have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 5, 2026

@vishal1011001 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vishal1011001
Copy link
Copy Markdown
Author

@Aamod007 I have made the requested changes,
This pull request contains only changes in AnimatedCursor.tsx file and no other files are included in the commit.
You can now review the PR and merge it.
Kindly add suitable labels for gssoc

…helper function.

Removed isHovering from dependency array of the useEffect.
@vishal1011001 vishal1011001 force-pushed the fix/3695-cursor-useEffect-trigger branch from a922927 to 8bb94ed Compare June 5, 2026 09:14
@github-actions github-actions Bot added the type:bug Something isn't working as expected label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSSoC 2026 level:intermediate Moderate complexity tasks mentor:Aamod007 type:bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix AnimatedCursor useEffect re-running on every hover

2 participants