Skip to content

fix: move initialization boolean inside component#2146

Merged
davehakkens merged 7 commits intoONEARMY:masterfrom
AlfonsoGhislieri:fix-2115-views-not-initializing
Mar 21, 2023
Merged

fix: move initialization boolean inside component#2146
davehakkens merged 7 commits intoONEARMY:masterfrom
AlfonsoGhislieri:fix-2115-views-not-initializing

Conversation

@AlfonsoGhislieri
Copy link
Contributor

@AlfonsoGhislieri AlfonsoGhislieri commented Mar 8, 2023

PR Checklist

PR Type

  • 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 change)
  • Developer experience (improves developer workflows for contributing to the project)

Description

I noticed that this line was added, the issue is that now it will set didInit to true after a single howto or research is viewed and then the useEffect won't run again for other pages until page refresh. This fixes the issue.

@cypress
Copy link

cypress bot commented Mar 8, 2023

Passing run #3057 ↗︎

0 77 3 0 Flakiness 0

Details:

chore: removed unused variable
Project: onearmy-community-platform Commit: d1d8ba4fa7
Status: Passed Duration: 03:26 💡
Started: Mar 21, 2023 9:13 AM Ended: Mar 21, 2023 9:17 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@thisislawatts
Copy link
Contributor

@AlfonsoGhislieri is there a test we can add that fails due to the buggy behaviour, and then passes as a result of this fix?

@AlfonsoGhislieri
Copy link
Contributor Author

Will have a look at adding some tests next week!

@AlfonsoGhislieri AlfonsoGhislieri force-pushed the fix-2115-views-not-initializing branch from ae36394 to e8f1b68 Compare March 19, 2023 13:14
@AlfonsoGhislieri
Copy link
Contributor Author

@thisislawatts I added some cypress tests to make sure the views all show up properly.

@davehakkens davehakkens merged commit 12fdec8 into ONEARMY:master Mar 21, 2023
@cypress cypress bot mentioned this pull request Mar 21, 2023
@onearmy-bot
Copy link
Collaborator

🎉 This PR is included in version 1.41.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants