diff --git a/web-ui/web-react/src/components/ComunidadViviendas.js b/web-ui/web-react/src/components/ComunidadViviendas.js index b29d4196..db3da58b 100644 --- a/web-ui/web-react/src/components/ComunidadViviendas.js +++ b/web-ui/web-react/src/components/ComunidadViviendas.js @@ -176,14 +176,18 @@ const Communities = () => { getCommunites(); }, []); - /*async function tenantsList(id) { + async function tenantsList(id) { await fetch(`http://localhost:4000/user/findTenants/${id}`, { method: 'GET' }) .then((response) => response.json()) .then(data => data.message) .then(data => { setTenants(data) }); - }*/ + } + + useEffect(() => { + tenantsList(community._id); + }, []) const saveCommunity = () => { @@ -300,7 +304,7 @@ const Communities = () => { const infoCommunity = async (community) => { - //await tenantsList(community._id); + await tenantsList(community._id); setCommunity({ ...community }); setCommunityDialog(true); @@ -569,16 +573,22 @@ const Communities = () => {
{' '}