The issue with the code continually refreshing is usually due to a loop which occurs when code within a subscription triggers that subscription to be run again, and there is a decent chance that is whats causing the issues with your accordion.
A good method for figuring out where this loop is happening is to use Redux Dev Tools, which is a plugin you can install in your Dev tools that tells you what actions are being performed by your database. There will most likely be an action which is being performed continuously so if you can determine which one it is, you can figure out which subscription is looping. The Chrome extension can be found here: https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en
To help us diagnose this issue I had a few questions as well.
Firstly, were there any steps that you took within the application which leads to this issue occurring, or is this something that will happen whenever you navigate to the page?
Also, is there a branch on your project which contains the code which is causing this error? As it will be easier to find the issue if we can also have a look at the code.