-
Notifications
You must be signed in to change notification settings - Fork 0
/
Header.js
51 lines (47 loc) · 1.9 KB
/
Header.js
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
import React from 'react'
import './Header.css'
import SearchIcon from '@mui/icons-material/Search';
import ShoppingBasketIcon from '@mui/icons-material/ShoppingBasket';
import { Link } from "react-router-dom";
import { useStateValue } from './StateProvider';
function Header() {
const [{ basket }, dispatch] = useStateValue();
return (
<div className='header'>
<Link to="/">
<img className='header_logo'
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQiTcDMpiVe0pSutnR0YWOXy3rIIBVpJzuHRA&usqp=CAU" alt="" />
</Link>
<div className='header_search'>
<input
className='header_searchInput' type='text'/>
<SearchIcon className='header_searchIcon'/>
</div>
<div className='header_nav'>
<div className='header_option'>
<span className='header_optionLineOne'>Hello Guest</span>
<span className='header_optionLineOne'>Sign in</span>
</div>
<div className='header_option'>
<span className='header_optionLineOne'>
Returns</span>
<span className='header_optionLineTwo'>
& Orders</span>
</div>
<div className='header_option'>
<span className='header_optionLineOne'>
Your</span>
<span className='header_optionLineTwo'>
Prime</span>
</div>
<Link to="/checkout">
<div className="header__optionBasket">
<ShoppingBasketIcon />
<span className='header__optionLineTwoheader__basketCount'>{ basket?.length }</span>
</div>
</Link>
</div>
</div>
);
}
export default Header