-
Notifications
You must be signed in to change notification settings - Fork 1
/
notification-view.tsx
72 lines (67 loc) · 1.89 KB
/
notification-view.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { Row, Col, Input } from 'antd'
import { MailOutlined } from '@ant-design/icons'
import styles from './notification-view.module.css'
import React, { useState } from 'react'
interface NotificationViewProps {
txHash?: string,
sellerEmail?: string,
}
const NotificationView = (
{
txHash,
sellerEmail,
}: NotificationViewProps
) => {
const registerTransactionNotifications = () => {
if (email) {
// TODO
fetch('TODO', {
method: 'post',
body: JSON.stringify({
txHash,
sellerEmail,
buyerEmail: email
})
})
}
}
const [ email, setEmail ] = useState<string>('')
return (
<div>
<Row>
<Col lg={24} md={24} sm={24} xs={24} className={styles.mailIcon}>
<MailOutlined />
</Col>
</Row>
<Row>
<Col lg={24} md={24} sm={24} xs={24} className={styles.header}>
Notifications
</Col>
</Row>
<Row className={styles.subHeadRow} >
<Col className={styles.subHead}>
We advise you to enable notifications to stay informed with this transaction in case there is a dispute. There may be times where you will need to take actions.
</Col>
</Row>
<Row>
<Col lg={24}>
<Input
className={styles.emailInput}
placeholder={'youremail@email.com'}
onChange={(e) => { setEmail(e.target.value as string)} }/>
</Col>
</Row>
<Row className={styles.actionButtons}>
<Col lg={5} md={7} sm={10} xs={11}>
<div className={styles.cancelButton}>Return</div>
</Col>
<Col lg={14} md={10} sm={4} xs={2}>
</Col>
<Col lg={5} md={7} sm={10} xs={11}>
<div className={styles.payButton} onClick={() => registerTransactionNotifications()}>Submit</div>
</Col>
</Row>
</div>
)
}
export default NotificationView