React.useEffect(() => {
const getSourse = async (url) => {
const getPerson = await getApiJson(url)
setPersonInfo([{title: 'Height', data: getPerson.height}, {title: 'Name', data: getPerson.name}])
const getFilms = await getApiJson(url)
setFilms(getFilms.films)
const allP = await Promise.all(films.map(el => fetch(el)
.then(el => el.json())
.then(json => filmsNameArr.push(json))
))
setFilmsName(filmsNameArr)
}
getSourse(getPersonUrl)
}, [])
@import "./../../style.scss";
.overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba($color: #000000, $alpha: .5);
z-index: 1000;
.basket {
float: right;
background-color: #fff;
height: $min-height;
}
}