import { BaseBox, Grid, ScrollableCustom, StackCustom, TextCustom, ViewWrapper, } from "@/components"; import { MainColor } from "@/constants/color-palet"; import { useState } from "react"; import { View } from "react-native"; const categories = [ { value: "all", label: "Semua" }, { value: "event", label: "Event" }, { value: "job", label: "Job" }, { value: "voting", label: "Voting" }, { value: "donasi", label: "Donasi" }, { value: "investasi", label: "Investasi" }, { value: "forum", label: "Forum" }, { value: "collaboration", label: "Collaboration" }, ]; const selectedCategory = (value: string) => { const category = categories.find((c) => c.value === value); return category?.label; }; const BoxNotification = ({ index, activeCategory, }: { index: number; activeCategory: string | null; }) => { return ( <> console.log( "Notification >", selectedCategory(activeCategory as string) ) } > # {selectedCategory(activeCategory as string)} Lorem ipsum dolor sit amet consectetur adipisicing elit. Sint odio unde quidem voluptate quam culpa sequi molestias ipsa corrupti id, soluta, nostrum adipisci similique, et illo asperiores deleniti eum labore. {index + 1} Agustus 2025 Belum lihat ); }; export default function Notifications() { const [activeCategory, setActiveCategory] = useState("all"); const handlePress = (item: any) => { setActiveCategory(item.value); // tambahkan logika lain seperti filter dsb. }; return ( ({ id: i, label: e.label, value: e.value, }))} onButtonPress={handlePress} activeId={activeCategory as string} /> } > {Array.from({ length: 20 }).map((e, i) => ( ))} ); }