Repository navigation
Expand file tree
/
Copy pathPayment.js
More file actions
42 lines (39 loc) · 1.58 KB
/
Copy pathPayment.js
File metadata and controls
42 lines (39 loc) · 1.58 KB
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
import React from 'react'
import CheckoutProduct from './CheckoutProduct';
import './payment.css'
import {useStateValue} from './StateProvider';
function Payment() {
const [{basket,user},dispatch] = useStateValue();
return (
<div className='payment'>
<div className='payment_container'>
<div className='payment_section'>
<div className='payment_title'>
<h3>Delivery Address</h3>
</div>
<div className='payment_address'>
<p>{user?user.email.slice(0,Array.from(user.email).findIndex((ch)=>ch==='@')):'Guest'}</p>
<p>Mariyamman Kovil street</p>
<p>Perambalur - 620 012</p>
</div>
</div>
<div className='payment_section'>
<div className='payment_title'>
<h3>Review items and Delivery</h3>
</div>
<div className='payment_items'>
{basket.map((item) => <CheckoutProduct ind={item}/>)}
</div>
</div>
<div className='payment_section'>
<div className='payment_title'>
<h3>Payment Method</h3>
</div>
<div className='payment_details'>
</div>
</div>
</div>
</div>
)
}
export default Payment