Переписываю спорные решения

This commit is contained in:
Дмитрий Савенко 2023-01-16 15:30:04 +03:00
parent 6f6ab5c4ce
commit e15ce861a3
2 changed files with 2 additions and 2 deletions

View File

@ -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))
); );

View File

@ -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)))