import useGet from "../Hooks/useGet"; import {Container} from "react-bootstrap"; import { FaLock, FaLockOpen } from "react-icons/fa"; import React from "react"; import useApprove from "../Hooks/useApprove"; const AllProfilesTable = () => { const { data, isLoading, setData, getData, setChanged } = useGet('/user') const { getData: approveProfile} = useApprove() !isLoading && console.log(data) const dateFormatter = (str) => { const inputDate = new Date(str); const options = { year: '2-digit', month: '2-digit', day: '2-digit', hour12: false, }; return inputDate.toLocaleString('mk-MK', options); } return ( <> {!isLoading && data.map((f, i) => { return })}
Име и презиме Адреса Email Датум на раѓање Контакт телефон Акции
{i + 1} {f.name + ' ' + f.surname} {f.address} {f.email} {dateFormatter(f.birthDate)} {f.contact} {f.accountNonLocked && { approveProfile('/users/unlock/' + f.userID).then(() => { setChanged((prev) => { return Math.random(); }) }) }}/>} {!f.accountNonLocked && { approveProfile('/users/unlock/' + f.userID).then(() => { setChanged((prev) => { return Math.random(); }) }) }}/>}
) } export default AllProfilesTable;