import { ExclamationIcon } from "@/assets/icons"; import EmptyListWrapper from "@/components/HOC/EmptyListWrapper"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; import TableSkeleton from "@/components/ui/TableSkeleton"; import { cn } from "@/lib/utils"; import { capitalize, getPaginatedRowNumber, unixToDate } from "@/utils/shared"; import { ShowcaseSection } from "@/components/Layouts/showcase-section"; import useFeedbackTablePresenter from "./useFeedbackTablePresenter"; interface IProps { id: string; paramKey: "tender_id" | "company_id" | "customer_id"; } const FeedbackTable = ({ id, paramKey }: IProps) => { const { columns, feedback, isLoading, pathName, router, getShowcaseSectionTitle, } = useFeedbackTablePresenter({ id, paramKey }); return ( {columns.map((column) => ( {column} ))} {isLoading && } {(feedback ?? []).map((item, index) => ( {getPaginatedRowNumber({ index })} {item.feedback_type} {unixToDate({ unix: item.updated_at, hasTime: true })} {unixToDate({ unix: item.created_at, hasTime: true })} ))}
); }; export default FeedbackTable;