Add: - ComponentDetailDataSection : Tampilan judul, deskripsi, batas waktu - BoxDetailHistorySection - (user)/voting/[id]/history Fix: Perbaikan component detail data pada: - screens/Voting/BoxDetailSection.tsx - screens/Voting/BoxDetailPublishSection.tsx - screens/Voting/BoxDetailContribution.tsx # No Issue
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import { ViewWrapper } from "@/components";
|
|
import TabsTwoHeaderCustom from "@/components/_ShareComponent/TabsTwoHeaderCustom";
|
|
import Voting_BoxPublishSection from "@/screens/Voting/BoxPublishSection";
|
|
import { useState } from "react";
|
|
|
|
export default function VotingHistory() {
|
|
const [activeCategory, setActiveCategory] = useState<string | null>("all");
|
|
|
|
const handlePress = (item: any) => {
|
|
setActiveCategory(item);
|
|
// tambahkan logika lain seperti filter dsb.
|
|
};
|
|
|
|
return (
|
|
<ViewWrapper
|
|
hideFooter
|
|
headerComponent={
|
|
<TabsTwoHeaderCustom
|
|
leftValue="all"
|
|
rightValue="main"
|
|
leftText="Semua Riwayat"
|
|
rightText="Riwayat Saya"
|
|
activeCategory={activeCategory}
|
|
handlePress={handlePress}
|
|
/>
|
|
}
|
|
>
|
|
{Array.from({ length: 10 }).map((_, index) => (
|
|
<Voting_BoxPublishSection
|
|
key={index}
|
|
id={activeCategory as any}
|
|
href={`/voting/${index}/history`}
|
|
/>
|
|
))}
|
|
</ViewWrapper>
|
|
);
|
|
}
|