Skip to content

Commit

Permalink
Use key
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamRagstad committed Aug 16, 2024
1 parent e2ca89e commit 66adb09
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/FAQ.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export const FAQ = () => (
content={item.answer}
key={`${item.question}-${item.answer}`}
links={item.links}
defaultOpen={index === 0}
/>
</div>
))}
Expand Down Expand Up @@ -110,9 +109,8 @@ const FAQBox = ({ defaultOpen, title, content, links }) => {
<div className="mt-4">
Read more about:{" "}
{links.map((link, index) => (
<>
<span key={`${link}-${index}`}>
<a
key={`${link}-${index}`}
href={link.url}
target="_blank"
className="text-primaryText hover:underline"
Expand All @@ -122,7 +120,7 @@ const FAQBox = ({ defaultOpen, title, content, links }) => {
{index < links.length - 1 && (
<span className="mr-2">,</span>
)}
</>
</span>
))}
</div>
)}
Expand Down

0 comments on commit 66adb09

Please sign in to comment.