File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ import React , { useState } from 'react' ;
22import { useSelector , shallowEqual } from 'react-redux' ;
33
44import { useFormatMessage } from 'hooks' ;
@@ -8,12 +8,14 @@ import ChangePassword from './ChangePassword';
88
99const Profile = ( ) => {
1010 const { userData } = useSelector (
11- state => ( {
12- userData : state . auth . userData
11+ ( state ) => ( {
12+ userData : state . auth . userData ,
1313 } ) ,
1414 shallowEqual
1515 ) ;
1616
17+ const [ user , setUser ] = useState ( userData ) ;
18+
1719 return (
1820 < >
1921 < section className = "hero is-hero-bar" >
@@ -22,7 +24,13 @@ const Profile = () => {
2224 </ div >
2325 </ section >
2426 < section className = "section is-main-section" >
25- < UserForm isEditing isProfile userData = { userData } action = { modifyUser } />
27+ < UserForm
28+ isEditing
29+ isProfile
30+ user = { user }
31+ setUser = { setUser }
32+ action = { modifyUser }
33+ />
2634 < ChangePassword />
2735 </ section >
2836 </ >
You can’t perform that action at this time.
0 commit comments