In your code, you're using a custom toggle with activeId state, but React Bootstrap's Accordion component has its own built-in functionality for handling which panel is active.
activeId
You need to make a few changes: