import React, { useState } from 'react';
const Accordion = ({ items }) => {
const [openIndex, setOpenIndex] = useState(0); // Start with first item open
const toggleItem = (index) => {
setOpenIndex(openIndex === index ? null : index);
};
return (
{items.map((item, index) => (
{item.content}
Our Solution:
{item.solution}
{item.resources && (
)}
))}
);
};
export default Accordion;