Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lifayi2008 committed Dec 14, 2022
1 parent 3b44c07 commit 3bbc04d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/dialog/Auction.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Link as RouterLink } from 'react-router-dom';
import {Link as RouterLink, useNavigate} from 'react-router-dom';
import PropTypes from 'prop-types';
import Web3 from 'web3';
import { addDays } from 'date-fns';
Expand Down Expand Up @@ -72,6 +72,7 @@ export default function Auction(props) {
const { enqueueSnackbar } = useSnackbar();
const { pasarLinkChain, diaBalance } = useSignin();
const coinTypes = getCoinTypesInCurrentNetwork(pasarLinkChain);
const navigate = useNavigate();

React.useEffect(() => {
const fetchData = async () => {
Expand Down Expand Up @@ -214,6 +215,7 @@ export default function Auction(props) {
}, 3000);
enqueueSnackbar('Auction success!', { variant: 'success' });
setOpen(false);
setTimeout(() => {navigate('/profile/myitem/1'); window.location.reload()}, 2000);
} else {
enqueueSnackbar('Auction error!', { variant: 'error' });
setOnProgress(false);
Expand Down

1 comment on commit 3bbc04d

@vercel
Copy link

@vercel vercel bot commented on 3bbc04d Dec 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.