Skip to content

Commit

Permalink
chore: error or warning notice
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Jan 19, 2022
1 parent c3db2dc commit 6d1c7aa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/component/ClaimAirdrop/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
ComfirmModalTitleForComfirm,
ComfirmModalTitleForCcongratulation,
} from './SubComponent';
import { Space } from 'antd';
import { Space, notification } from 'antd';
import axios from 'axios';
import { ethers } from 'ethers';

Expand Down Expand Up @@ -92,10 +92,19 @@ const ClaimAirdrop: React.FC<Props> = ({ className }) => {
setVisibleClaimedModal(true);
} else if (data?.message === 'All airdrops have ended') {
setVisibleNoneLeftModal(true);
} else {
notification.warning({
message: 'Woops, something went wrong',
description: data?.message,
});
}
})
.catch((err) => {
.catch((err: Error) => {
console.error('send claim trans:', err);
notification.error({
message: 'Woops, something went wrong',
description: err.message,
});
})
.finally(() => {
setVisibleLoadingModal(false);
Expand Down

0 comments on commit 6d1c7aa

Please sign in to comment.