import { PiDotsThreeOutlineVerticalFill } from "react-icons/pi"; import { FaCheck, FaDatabase } from "react-icons/fa"; import AddAccountModal from "../accounts/AddAccountModal"; import { Bounce, toast } from "react-toastify"; import api from "../../config/api"; import { useState } from "react"; const Templates = () => { const [openMenuId, setOpenMenuId] = useState(null); const handleAction = async (accountId: string, action: 'accept' | 'reject') => { try { let response = await api.post(`/api/accounts/${accountId}/accept/invite`) console.log(response) if (response.data.status === 202) { toast.success("Login Successful", { position: "top-center", autoClose: 5000, hideProgressBar: false, closeOnClick: false, pauseOnHover: true, draggable: true, progress: undefined, theme: "light", transition: Bounce, }); } } catch (error) { console.error('Error posting data:', error); } finally { setOpenMenuId(null); // close menu } }; return ( <>
Name Owner Created Date Last Change
{/* {selectedTransactions.includes(tx.id) && ( )} */}
{"test"}
{"1"} {"role"} {"text"} {/* Dropdown menu */} {/* {openMenuId === "1" && (
e.stopPropagation()} // prevent row click closing >
)} */}
); }; export default Templates;