feat(wallet): add link to nym exchange interface

This commit is contained in:
pierre
2022-11-28 13:36:17 +01:00
committed by durch
parent d58c2da463
commit 51b29a9dcf
3 changed files with 5 additions and 29 deletions
@@ -1,12 +0,0 @@
import React from 'react';
import { DeclinedModal } from './DeclinedModal';
export default {
title: 'Buy/DeclinedModal',
component: DeclinedModal,
};
export const Terms = () => (
<DeclinedModal onOk={async () => console.log('user has accepted')} onClose={async () => console.log('closed')} />
);
@@ -1,15 +0,0 @@
import React from 'react';
import { Typography } from '@mui/material';
import { ConfirmationModal } from '../Modals/ConfirmationModal';
export const DeclinedModal = ({ onOk, onClose }: { onOk: () => Promise<void>; onClose: () => void }) => (
<ConfirmationModal
open
title="Buy Nym Terms and Conditions"
confirmButton="Go back to Terms and Conditions"
onConfirm={onOk}
onClose={onClose}
>
<Typography>Cant procced to buy tokens without acceptance</Typography>
</ConfirmationModal>
);
+5 -2
View File
@@ -4,6 +4,9 @@ import { Tune as TuneIcon, BorderColor as BorderColorIcon, Paid as PaidIcon } fr
import { NymCard } from '../NymCard';
import { SignMessageModal } from './SignMessageModal';
// TODO retrieve this value from env
const EXCHANGE_URL = 'https://buy.nymtech.net';
const borderColor = 'rgba(141, 147, 153, 0.2)';
const TutorialStep = ({
@@ -110,8 +113,8 @@ export const Tutorial = () => {
<Button variant="outlined" size="large" onClick={() => setShowSignModal(true)}>
Sign message
</Button>
<Button variant="contained" size="large" onClick={() => {}}>
Buy Nym
<Button variant="contained" size="large" href={EXCHANGE_URL} target="_blank">
Buy NYM
</Button>
</Stack>
</NymCard>