Skip to content

Fix memory leak in Navbar component by updating useSpring animation#150

Merged
DianaLease merged 2 commits intoaccordproject:mainfrom
sancheet230:main
Mar 6, 2025
Merged

Fix memory leak in Navbar component by updating useSpring animation#150
DianaLease merged 2 commits intoaccordproject:mainfrom
sancheet230:main

Conversation

@sancheet230
Copy link
Contributor

@sancheet230 sancheet230 commented Mar 3, 2025

This PR fixes a potential memory leak in the Navbar component by modifying the animation logic to avoid an infinite loop within the useSpring hook. The useSpring animation now uses the loop: true configuration to handle the animation looping correctly without causing memory leaks or performance issues when the component unmounts.

Changes

  1. Replaced the infinite loop (while (true)) inside the useSpring hook with the loop: true option to handle the animation properly and avoid memory leaks.
  2. Ensured that the component's animation will loop correctly without any additional manual timing or cleanup required.

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

Signed-off-by: sancheet230 <sancheet.p24@medhaviskillsuniversity.edu.in>
@sancheet230 sancheet230 requested a review from a team as a code owner March 3, 2025 11:24
@netlify
Copy link

netlify bot commented Mar 3, 2025

Deploy Preview for ap-template-playground ready!

Name Link
🔨 Latest commit 3c57dc1
🔍 Latest deploy log https://app.netlify.com/sites/ap-template-playground/deploys/67c92db73fe2b600081a78ed
😎 Deploy Preview https://deploy-preview-150--ap-template-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sancheet230
Copy link
Contributor Author

sancheet230 commented Mar 3, 2025

I think this PR is ready for review @sanketshevkar @DianaLease @mttrbrts @dselman

Copy link
Member

@DianaLease DianaLease left a comment

Choose a reason for hiding this comment

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

Please remove the comment. otherwise, looks great!

@sancheet230
Copy link
Contributor Author

sancheet230 commented Mar 6, 2025

@DianaLease @nitro56565 I forgot to add DCO sign-off for the second commit in this PR deleting the comments and I don't have enough permissions to edit commit message So can you help me out

Signed-off-by: sancheet230 <sancheet.p24@medhaviskillsuniversity.edu.in>
@nitro56565
Copy link
Contributor

Hey @sancheet230, whenever you forget to signoff you have to rebase and then force push with sign off (you can also read about this in workflow approvals checks, just click on the DCO and read the doc)
for now you can try these commands:
git rebase HEAD~2 --signoff
git push --force-with-lease origin main

@sancheet230
Copy link
Contributor Author

@nitro56565 Thanks a lot for the help it worked

@sancheet230
Copy link
Contributor Author

@DianaLease I have removed the unwanted comments you can review again now

@sancheet230
Copy link
Contributor Author

@DianaLease @nitro56565 And I think Accord Project Slack is not working So is there any method to connect to maintainers or community cause I have some doubts

@DianaLease
Copy link
Member

@DianaLease @nitro56565 And I think Accord Project Slack is not working So is there any method to connect to maintainers or community cause I have some doubts

We use Discord: https://discord.com/invite/Zm99SKhhtA

@DianaLease DianaLease merged commit 22fddc3 into accordproject:main Mar 6, 2025
7 checks passed
ansh7432 pushed a commit to ansh7432/template-playground that referenced this pull request Mar 6, 2025
…ation (accordproject#150)

* This is my commit message

Signed-off-by: sancheet230 <sancheet.p24@medhaviskillsuniversity.edu.in>

* Removing unwanted comments
Signed-off-by: sancheet230 <sancheet.p24@medhaviskillsuniversity.edu.in>

---------

Signed-off-by: sancheet230 <sancheet.p24@medhaviskillsuniversity.edu.in>
Signed-off-by: ansh7432 <anshsoni743@gmail.com>
ansh7432 pushed a commit to ansh7432/template-playground that referenced this pull request Mar 6, 2025
…ation (accordproject#150)

* This is my commit message

Signed-off-by: sancheet230 <sancheet.p24@medhaviskillsuniversity.edu.in>

* Removing unwanted comments
Signed-off-by: sancheet230 <sancheet.p24@medhaviskillsuniversity.edu.in>

---------

Signed-off-by: sancheet230 <sancheet.p24@medhaviskillsuniversity.edu.in>
Signed-off-by: ansh7432 <anshsoni743@gmail.com>
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