From eb6f17bf5abb0222cb8107c348dec9a0be60019c Mon Sep 17 00:00:00 2001 From: Thomas KLEIN Date: Mon, 3 Feb 2025 11:06:07 +0100 Subject: [PATCH] Remove overload --- src/components/Faq/Faq.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/Faq/Faq.tsx b/src/components/Faq/Faq.tsx index 697149c..21fbfe6 100644 --- a/src/components/Faq/Faq.tsx +++ b/src/components/Faq/Faq.tsx @@ -107,21 +107,18 @@ const Faq = ({ limit = !limit || limit > faqList.length ? faqList.length : limit; const faqWrap = []; - let displayClass = ''; if (display === 'grid') { faqWrap.push(faqList.slice(0, Math.ceil((limit) / 2))); faqWrap.push(faqList.slice(Math.ceil((limit) / 2), limit)); - displayClass = 'flex flex-col w-full lg:w-1/2 gap-4 px-4 py-2' } else { faqWrap.push(faqList.slice(0, limit)); - displayClass = 'flex flex-col gap-4'; } let faqId = 0; return ( -
+
{faqWrap.map((faqItems, index) => ( -
+
{faqItems.map((faq) => ( renderFaqItem(faq, faqId++) ))}