import React from 'react'; import CardBox from '../CardBox'; import dataFormatter from '../../helpers/dataFormatter'; import ListActionsPopover from "../ListActionsPopover"; import {useAppSelector} from "../../stores/hooks"; import {Pagination} from "../Pagination"; import LoadingSpinner from "../LoadingSpinner"; import Link from 'next/link'; type Props = { chatbot_entries: any[]; loading: boolean; onDelete: (id: string) => void; currentPage: number; numPages: number; onPageChange: (page: number) => void; }; const ListChatbot_entries = ({ chatbot_entries, loading, onDelete, currentPage, numPages, onPageChange }: Props) => { const corners = useAppSelector((state) => state.style.corners); const bgColor = useAppSelector((state) => state.style.cardsColor); return ( <>
{loading && } {!loading && chatbot_entries.map((item) => (

Question

{ item.question }

Answer

{ item.answer }

Created_by

{ dataFormatter.usersOneListFormatter(item.created_by) }

Hoa

{ dataFormatter.hoasOneListFormatter(item.hoa) }

))} {!loading && chatbot_entries.length === 0 && (

No data to display

)}
) }; export default ListChatbot_entries