Ordinarily with a component with this much repetition in structure, if pulling from an API, one would use a mapped list to minimize code. However, in this particular case, the presence of links in the text content adds some complication to this logistically. In addition, since the text is stored locally, we would wouldn't actually be saving many lines of code. In the end, it seemed simplest and clearest to hard-code the sections/content, but use styled components for the repetitious portions of the structure. This allows us to still edit styling of the sections all at once if needed.
Testing Instructions
In the Netlify preview, click the 'FAQ' button. It should open the correct modal. Clicking the accordions should toggle them.
Overview
Adds content for the FAQ and About modals.
Connects #31
Demo
Notes
Ordinarily with a component with this much repetition in structure, if pulling from an API, one would use a mapped list to minimize code. However, in this particular case, the presence of links in the text content adds some complication to this logistically. In addition, since the text is stored locally, we would wouldn't actually be saving many lines of code. In the end, it seemed simplest and clearest to hard-code the sections/content, but use styled components for the repetitious portions of the structure. This allows us to still edit styling of the sections all at once if needed.
Testing Instructions