Skip to content

Commit

Permalink
[Issue-213] Update some UX for Missions
Browse files Browse the repository at this point in the history
  • Loading branch information
lw-cdm committed Nov 29, 2024
1 parent c132d55 commit e12fc24
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ function Component (props: Props): React.ReactElement<Props> {

const { inactiveModal } = useContext(ModalContext);

const onClose = useCallback(() => {
const onOk = useCallback(() => {
inactiveModal(modalId);
callback(address);
}, [address, callback, inactiveModal]);

const onClose = useCallback(() => {
inactiveModal(modalId);
// eslint-disable-next-line node/no-callback-literal
callback('');
}, [callback, inactiveModal]);

const modalFooter = useMemo(() => {
return (
<>
Expand All @@ -43,15 +49,15 @@ function Component (props: Props): React.ReactElement<Props> {
weight='fill'
/>
}
onClick={onClose}
onClick={onOk}
shape={'round'}
size={'sm'}
>
{t('Continue')}
</Button>
</>
);
}, [onClose, t]);
}, [onOk, t]);

return (
<SwModal
Expand Down

0 comments on commit e12fc24

Please sign in to comment.