Переписываю спорные решения
This commit is contained in:
parent
6f6ab5c4ce
commit
e15ce861a3
@ -25,7 +25,7 @@ export const ProfileHeader = () => {
|
|||||||
const [isLoggingOut, setIsLoggingOut] = useState(false);
|
const [isLoggingOut, setIsLoggingOut] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
apiRequest(`/api/profile/${localStorage.getItem('cardId')}`)
|
apiRequest(`/profile/${localStorage.getItem('cardId')}`)
|
||||||
.then((profileInfo) =>
|
.then((profileInfo) =>
|
||||||
dispatch(setProfileInfo(profileInfo))
|
dispatch(setProfileInfo(profileInfo))
|
||||||
);
|
);
|
||||||
|
@ -33,7 +33,7 @@ const FormPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!candidate.id) {
|
if (!candidate.id) {
|
||||||
apiRequest('/api/profile', {
|
apiRequest('/profile', {
|
||||||
params: Number(params.id)
|
params: Number(params.id)
|
||||||
})
|
})
|
||||||
.then((el) => dispatch(currentCandidate(el)))
|
.then((el) => dispatch(currentCandidate(el)))
|
||||||
|
Loading…
Reference in New Issue
Block a user