@@ -7,8 +7,17 @@ import { cleanProfile } from "../../actions/profileAction";
7
7
import { logout } from "../../actions/authAction" ;
8
8
import { loadProfile } from "../../actions/profileAction" ;
9
9
import isEmpty from "../../utils/isEmpty" ;
10
- import { motion } from "framer-motion" ;
11
10
import { initDropAnim , resetDropAnim } from "../../actions/framerAction" ;
11
+ import {
12
+ Box ,
13
+ Button ,
14
+ Flex ,
15
+ HStack ,
16
+ Image ,
17
+ ListItem ,
18
+ Text ,
19
+ UnorderedList ,
20
+ } from "@chakra-ui/react" ;
12
21
13
22
const Navbar = ( {
14
23
navbar,
@@ -53,57 +62,55 @@ const Navbar = ({
53
62
} ;
54
63
55
64
return navbar ? (
56
- < div className = "container nav-container ">
57
- < div ref = { dropCloser } className = "drop-closer" onClick = { closeDrop } > </ div >
58
- < nav className = "navbar navbar-expand-lg navbar-light bg-light bd-navbar d-flex justify-content- between">
59
- < Link className = "navbar-brand" to = "/" >
60
- DevHelp
65
+ < Flex height = "80px" alignItems = "center" px = "50px ">
66
+ < Box ref = { dropCloser } onClick = { closeDrop } > </ Box >
67
+ < Flex w = "100vw" justifyContent = "space- between" alignItems = "center ">
68
+ < Link to = "/" >
69
+ < Text fontSize = "18px" > DevHelp</ Text >
61
70
</ Link >
62
- < div className = "utils d-flex align-items- center">
63
- < div className = "icons ">
64
- < span >
71
+ < Flex justifyContent = "center" alignItems = " center">
72
+ < Flex justifyContent = "center" alignItems = "center ">
73
+ < Box ml = "20px" >
65
74
< i className = "fas fa-search" > </ i >
66
- </ span >
67
- < span >
75
+ </ Box >
76
+ < Box ml = "20px" >
68
77
< i className = "far fa-bookmark" > </ i >
69
- </ span >
70
- </ div >
71
- < div className = "upgrade" >
72
- < button className = "btn btn-outline-secondary" > Upgrade</ button >
73
- </ div >
74
- < div className = "user-icon" onClick = { openDropDown } >
75
- < div className = "img" >
78
+ </ Box >
79
+ </ Flex >
80
+ < Box ml = "20px" >
81
+ < Button variant = "outline" h = "30px" >
82
+ Upgrade
83
+ </ Button >
84
+ </ Box >
85
+ < Box onClick = { openDropDown } ml = "20px" >
86
+ < Box >
76
87
{ profile . profile . image && (
77
- < img
88
+ < Image
89
+ boxSize = "40px"
90
+ borderRadius = "100%"
78
91
src = { profile . profile . image ? profile . profile . image : "" }
79
92
alt = "User profile image"
80
93
/>
81
94
) }
82
- </ div >
83
- < motion . ul
84
- animate = { { scale : framerAnim . dropDown . scale } }
85
- transition = { {
86
- duration : framerAnim . dropDown . duration ,
87
- ease : "easeIn" ,
88
- } }
89
- ref = { dropDown }
90
- className = "drop-down-container flex-column text-center"
91
- >
92
- < li > { ! isAuthenticated && < Link to = "/login" > Login</ Link > } </ li >
93
- < li >
95
+ </ Box >
96
+ < UnorderedList ref = { dropDown } listStyleType = "none" display = "none" >
97
+ < ListItem >
98
+ { ! isAuthenticated && < Link to = "/login" > Login</ Link > }
99
+ </ ListItem >
100
+ < ListItem >
94
101
< Link to = "/dashboard/home" > Dashboard</ Link >
95
- </ li >
96
- < li >
102
+ </ ListItem >
103
+ < ListItem >
97
104
< Link to = "/compose-post" > Compose Post</ Link >
98
- </ li >
99
- < li onClick = { logMeOut } >
105
+ </ ListItem >
106
+ < ListItem onClick = { logMeOut } >
100
107
< Link to = "/" > Logout</ Link >
101
- </ li >
102
- </ motion . ul >
103
- </ div >
104
- </ div >
105
- </ nav >
106
- </ div >
108
+ </ ListItem >
109
+ </ UnorderedList >
110
+ </ Box >
111
+ </ Flex >
112
+ </ Flex >
113
+ </ Flex >
107
114
) : (
108
115
< div > </ div >
109
116
) ;
0 commit comments