Skip to content

Commit

Permalink
Merge pull request #19 from fga-eps-mds/fix/redirect
Browse files Browse the repository at this point in the history
[FIX]: Redirecionamento para a visualização do contrato
  • Loading branch information
eliseukadesh67 authored Jul 30, 2024
2 parents ed95fb4 + a12b677 commit 213e289
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/forms/ContractForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion src/pages/ContractList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 213e289

Please sign in to comment.