diff --git a/src/components/forms/ContractForm.js b/src/components/forms/ContractForm.js index 3dd2b539..164d364f 100644 --- a/src/components/forms/ContractForm.js +++ b/src/components/forms/ContractForm.js @@ -36,7 +36,7 @@ export default function ContractForm() { if (response.type === "success") { toast.success("Contrato criado com sucesso!"); setTimeout(() => { - const url = `/verContrato/${response.data.id}`; + const url = `/verContrato/${response.data.data.id}`; window.location = url }, 3000); } else { diff --git a/src/pages/ContractList.js b/src/pages/ContractList.js index ab1293d8..63f46fc7 100644 --- a/src/pages/ContractList.js +++ b/src/pages/ContractList.js @@ -18,7 +18,6 @@ export default function ContractList() { const fetchContracts = async () => { try { const response = await getContract(); - console.log(response.data.data); if (response.type === "success") { setContracts(response.data.data); } else {