-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly update swap state for the final exchange
- Loading branch information
Showing
3 changed files
with
73 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 24 additions & 2 deletions
26
src/front/shared/pages/Exchange/QuickSwap/ReviewSwapModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
export default function ReviewSwapModal() { | ||
return <div className="swapPreviewModal">Review swap here</div> | ||
import { Modal } from 'components/modal' | ||
|
||
interface Props { | ||
data: any | ||
onSwap: VoidFunction | ||
onClose: VoidFunction | ||
} | ||
|
||
export default function ReviewSwapModal(props: Props) { | ||
const { data, onSwap, onClose } = props | ||
|
||
return ( | ||
<div className="swapPreviewModal"> | ||
<Modal | ||
name={'Preview swap'} | ||
title={'Preview your swap to be sure you are good to go'} | ||
onClose={onClose} | ||
showCloseButton | ||
> | ||
<>{JSON.stringify(data, undefined, 2)}</> | ||
<button onClick={onSwap}>Swap</button> | ||
</Modal> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters