File tree 6 files changed +26
-5
lines changed
apps/client/src/components
6 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 1
1
function UserDeleteTab ( ) {
2
2
return (
3
3
< div className = "mt-8" >
4
- < h2 className = "mb-4 text-3xl" > Delete user account</ h2 >
4
+ < h2 className = "mb-4 text-3xl" > Delete account</ h2 >
5
5
</ div >
6
6
) ;
7
7
}
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { BsPencil } from 'react-icons/bs';
2
2
import { Link } from 'react-router-dom' ;
3
3
import IconButton from '../../IconButton' ;
4
4
import UserProfileCard from '../../UserProfileCard' ;
5
- import UserDangerZone from '../../User/UserDangerZone' ;
6
5
7
6
function UserDetailsTab ( ) {
8
7
return (
@@ -15,7 +14,6 @@ function UserDetailsTab() {
15
14
>
16
15
< IconButton icon = { BsPencil } > Edit profile</ IconButton >
17
16
</ Link >
18
- < UserDangerZone />
19
17
</ div >
20
18
) ;
21
19
}
Original file line number Diff line number Diff line change
1
+ function UserPasswordChangeTab ( ) {
2
+ return (
3
+ < div className = "mt-8" >
4
+ < h2 className = "mb-4 text-3xl" > Change password</ h2 >
5
+ </ div >
6
+ ) ;
7
+ }
8
+ export default UserPasswordChangeTab ;
Original file line number Diff line number Diff line change
1
+ import { BsShieldLock } from 'react-icons/bs' ;
2
+ import IconButton from '../../IconButton' ;
3
+ import UserDangerZone from '../../User/UserDangerZone' ;
4
+ import { Link } from 'react-router-dom' ;
5
+
1
6
function UserSecurityTab ( ) {
2
7
return (
3
8
< div className = "mt-8" >
4
9
< h2 className = "mb-4 text-3xl" > Privacy & Security </ h2 >
5
- < p className = "mb-4 text-muted" >
10
+ < p className = "mb-6 text-muted" >
6
11
Manage options to secure your account and protect your privacy.
7
12
</ p >
13
+ < Link to = "../change-password" >
14
+ < IconButton icon = { BsShieldLock } > Change password</ IconButton >
15
+ </ Link >
16
+
17
+ < UserDangerZone />
8
18
</ div >
9
19
) ;
10
20
}
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ import UserUpdateTab from './Pages/User/UserUpdateTab';
49
49
import UserConfirmEmailTab from './Pages/User/UserConfirmEmailTab' ;
50
50
import UserEmailChangeTab from './Pages/User/UserEmailChangeTab' ;
51
51
import UserDeleteTab from './Pages/User/UserDeleteTab' ;
52
+ import UserPasswordChangeTab from './Pages/User/UserPasswordChangeTab' ;
52
53
53
54
function Router ( ) {
54
55
const router = createBrowserRouter ( [
@@ -148,6 +149,10 @@ function Router() {
148
149
path : 'change-email' ,
149
150
element : < UserEmailChangeTab /> ,
150
151
} ,
152
+ {
153
+ path : 'change-password' ,
154
+ element : < UserPasswordChangeTab /> ,
155
+ } ,
151
156
] ,
152
157
} ,
153
158
] ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ function UserDangerZone() {
8
8
< h2 className = "mb-4 text-2xl" > Danger Zone</ h2 >
9
9
< p className = "text-muted" > Potentially destructive actions, be cautious!</ p >
10
10
< div className = "mt-6 inline-flex flex-col gap-6" >
11
- < Link to = "delete" >
11
+ < Link to = "../ delete" >
12
12
< IconButton
13
13
variant = "danger"
14
14
icon = { BsPersonXFill }
You can’t perform that action at this time.
0 commit comments