Skip to content

added the cleanup in emailVerfication#1308

Merged
regulartim merged 1 commit intoGreedyBear-Project:developfrom
Deepanshu1230:enhancement/add-effect-cleanup-EmailVerification
May 4, 2026
Merged

added the cleanup in emailVerfication#1308
regulartim merged 1 commit intoGreedyBear-Project:developfrom
Deepanshu1230:enhancement/add-effect-cleanup-EmailVerification

Conversation

@Deepanshu1230
Copy link
Copy Markdown
Contributor

Description

Added effect cleanup in EmailVerification component by storing the setTimeout return value and clearing it in the useEffect cleanup function.

Type of change

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Chore (refactoring, dependency updates, CI/CD changes, code cleanup, docs-only changes).

Checklist

Formalities

  • I have read and understood the rules about how to Contribute to this project.
  • I chose an appropriate title for the pull request in the form: Add effect cleanup in EmailVerification. Closes #[issue number]
  • My branch is based on develop.
  • The pull request is for the branch develop.
  • I have reviewed and verified any LLM-generated code included in this PR.

Docs and tests

  • I documented my code changes with docstrings and/or comments.
  • I have checked if my changes affect user-facing behavior — they do not.
  • Linter (Ruff) gave 0 errors.
  • I have added tests for the feature/bug I solved — no new tests required, existing tests pass.
  • All the tests gave 0 errors.

Closes issue #1252

Copilot AI review requested due to automatic review settings April 24, 2026 06:48
Copy link
Copy Markdown
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.

Pull request overview

This PR aims to fix issue #1252 by adding missing useEffect cleanup logic in the EmailVerification component to prevent a scheduled setTimeout from firing after the effect is torn down.

Changes:

  • Store the setTimeout ID when scheduling the email verification call.
  • Clear the timeout in the useEffect cleanup function when the effect is cleaned up.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/components/auth/EmailVerification.jsx
Comment thread frontend/src/components/auth/EmailVerification.jsx
Copy link
Copy Markdown
Member

@regulartim regulartim left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! :)

@regulartim regulartim merged commit 6d29193 into GreedyBear-Project:develop May 4, 2026
8 of 9 checks passed
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.

3 participants