- {content?.slice(0, 4).map((item: any, index: number) => (
+ {(seeAllValuePolda ? content : content?.slice(0, 3))?.map((item: any, index: number) => (
{
: `${locale}/audio/detail/${item?.slug}`
}
>
-
+
))}
-
{" "} */}
+ {/* Tombol See More / See Less */}
+ {content?.length > 3 && (
+
+
setSeeAllValuePolda(!seeAllValuePolda)} className="bg-white hover:bg-[#bb3523] text-[#bb3523] hover:text-white border-2 border-[#bb3523]">
+ {seeAllValuePolda ? t("seeLess") : t("seeMore")}
+
+
+
+
+ )}
@@ -175,9 +190,9 @@ const ScrollableContent = () => {
- {content
+ {/* {seeAllValue ? content : content
?.filter((item: any) => item.isPublishOnPolda === true)
- .slice(0, 4)
+ .slice(0, 3)
.map((item: any, index: number) => (
@@ -212,15 +227,75 @@ const ScrollableContent = () => {
{htmlToString(item.description)}
- ))}
-
+ ))} */}
+ {/*
LEBIH SEDIKIT
-
+ */}
+ {(seeAllValueSatker ? content : content?.slice(0, 3))?.map((item: any, index: number) => (
+
+
+ {/*
*/}
+
+
{item.categoryName}
+
{item.title}
+
{htmlToString(item.description)}
+
+
+ ))}
+ {/* Tombol See More / See Less */}
+ {content?.length > 3 && (
+
+
setSeeAllValueSatker(!seeAllValueSatker)} className="bg-white hover:bg-[#bb3523] text-[#bb3523] hover:text-white border-2 border-[#bb3523]">
+
+
+ {seeAllValueSatker ? t("seeLess") : t("seeMore")}
+
+
+
+
+ )}