diff --git a/src/pages/shop/section/productList/components/ModalBuy.tsx b/src/pages/shop/section/productList/components/ModalBuy.tsx index efe4d41..69ead53 100644 --- a/src/pages/shop/section/productList/components/ModalBuy.tsx +++ b/src/pages/shop/section/productList/components/ModalBuy.tsx @@ -57,7 +57,7 @@ const ModalBuy = ({ isOpen, setIsOpen, configId }: ModalBuyProps) => { const hasExtraDescription = Boolean( data?.data?.result?.has_extra_description ); - const extraDescription = data?.data?.result?.extra_description ?? ""; + const extraDescriptionSections = data?.data?.result?.extra_description ?? []; const advancedVerificationFromApi = data?.data?.result?.requires_advanced_verification; const hasAdvancedVerificationApiFlag = @@ -246,7 +246,7 @@ const ModalBuy = ({ isOpen, setIsOpen, configId }: ModalBuyProps) => { >; - description?: string | null; + sections?: DescriptionSection[]; } +const Section = ({ + emoji, + title, + children, +}: { + emoji?: string; + title?: string; + children: React.ReactNode; +}) => ( +
+
+ {emoji && {emoji}} + {title && {title}} +
+ {children} +
+); + const ModalDnsServiceInfo = ({ isOpen, setIsOpen, - description, + sections, }: ModalDnsServiceInfoProps) => { return (
-

- {description} -

+ {(sections ?? []).map((section, sectionIndex) => ( +
+ {section.items && section.items.length > 0 && ( +
    + {section.items.map((item, itemIndex) => ( +
  • + 🔹 + {item} +
  • + ))} +
+ )} +
+ ))}
);