git fetch

This commit is contained in:
Николай Полтщук 2023-01-03 00:30:21 +03:00
parent 8588270ed6
commit 405986d5d5

View File

@ -10,6 +10,7 @@ import './profileHeader.scss'
export const ProfileHeader = () => { export const ProfileHeader = () => {
const [isLoggingOut, setIsLoggingOut] = useState(false); const [isLoggingOut, setIsLoggingOut] = useState(false);
const [gitInfo, setGitInfo] = useState([])
const dispatch = useDispatch(); const dispatch = useDispatch();
const userRole = useSelector(getRole); const userRole = useSelector(getRole);
const profileInfo = useSelector(getProfileInfo) const profileInfo = useSelector(getProfileInfo)
@ -21,6 +22,11 @@ export const ProfileHeader = () => {
}).then((profileInfo) => { }).then((profileInfo) => {
dispatch(setProfileInfo(profileInfo)) dispatch(setProfileInfo(profileInfo))
}) })
fetchGet({
link: `${process.env.REACT_APP_API_URL}/api/profile/portfolio-projects?card_id=${localStorage.getItem('cardId')}`,
}).then((responseGit) => {
setGitInfo(responseGit)
})
}, []) }, [])
return( return(
<header className='profileHeader'> <header className='profileHeader'>