Remove AccordionContainer
wrapper component
#317
Labels
streamline eCR
Issues for the Streamline eCR team
AccordionContainer
wrapper component
#317
What needs to be done
Currently, the only usage of
AccordionContainer
is within theAccordionContent
component.AccordionContent
passes along itsAccordionItems
toAccordionContainer
, which modifies them, and finally passes them to the USWDSAccordion
component where the items are rendered.We should remove the middle step of passing the items to the
AccordionContainer
and instead haveAccordionContent
pass its items directly to the USWDSAccordion
component.Why it needs to be done
As you can probably tell from the description, we have a lot of accordion-related component nesting that can be simplified. This change should help to reduce the cognitive complexity when dealing with the primary accordion layout used by the
/view-data
page.Acceptance Criteria
AccordionContainer.tsx
is deletedAccordionContainer.test.tsx
is deletedAccordionContainer
should be moved intoAccordionContent
(if keeping it is desired)AccordionContainer
tests should be moved intoAccordionContent.test.tsx
and should continue to pass (if functionality remains)Technical Notes
N/A
The text was updated successfully, but these errors were encountered: