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 = [ { id: 1, label: "Semua" }, { id: 2, label: "Event" }, { id: 3, label: "Job" }, { id: 4, label: "Voting" }, { id: 5, label: "Donasi" }, { id: 6, label: "Investasi" }, { id: 7, label: "Forum" }, { id: 8, label: "Collaboration" }, ]; const selectedCategory = (id: number) => { const category = categories.find((c) => c.id === id); return category?.label; }; const BoxNotification = ({ index, activeCategory, }: { index: number; activeCategory: number | null; }) => { return ( <> console.log( "Notification >", selectedCategory(activeCategory as number) ) } > # {selectedCategory(activeCategory as number)} 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(1); const handlePress = (item: any) => { setActiveCategory(item.id); // tambahkan logika lain seperti filter dsb. }; return ( } > {Array.from({ length: 20 }).map((e, i) => ( ))} {/* Konten utama di sini */} {/* {activeCategory ? `Kategori Aktif: ${ categories.find((c) => c.id === activeCategory)?.label }` : "Pilih kategori"} */} ); }