fixed code
This commit is contained in:
parent
800dc0f48c
commit
397f867f2b
@ -49,7 +49,7 @@ const Description = ({ candidatesListArr, getCandidate, onLoadMore }) => {
|
|||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<div className={style.description__footer}>
|
<div className={style.description__footer}>
|
||||||
<div className={style.description__footer__btn}>
|
<div className={style.description__footer__btn}>
|
||||||
<button onClick={() => onLoadMore(3)}>Загрузить еще</button>
|
<button onClick={() => onLoadMore(2)}>Загрузить еще</button>
|
||||||
</div>
|
</div>
|
||||||
<div className={style.description__footer__box}>
|
<div className={style.description__footer__box}>
|
||||||
<div className={style.arrow__left}>
|
<div className={style.arrow__left}>
|
||||||
|
@ -32,7 +32,7 @@ const Home = ({ getCandidate }) => {
|
|||||||
const [tags, setTags] = useState([]);
|
const [tags, setTags] = useState([]);
|
||||||
const [profiles, setProfiles] = useState([]);
|
const [profiles, setProfiles] = useState([]);
|
||||||
const [selectedTab, setSelectedTab] = useState('');
|
const [selectedTab, setSelectedTab] = useState('');
|
||||||
const [countArr, setCountArr] = useState(0);
|
const [countArr, setCountArr] = useState(2);
|
||||||
const [candidatesArray, setCandidatesArray] = useState([]);
|
const [candidatesArray, setCandidatesArray] = useState([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -88,7 +88,7 @@ const Home = ({ getCandidate }) => {
|
|||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const shorthandArray = candidatesArray.slice(countArr, 2);
|
const shorthandArray = candidatesArray.slice(0, countArr);
|
||||||
|
|
||||||
const loadMore = (count) => {
|
const loadMore = (count) => {
|
||||||
setCountArr((prev) => prev + count);
|
setCountArr((prev) => prev + count);
|
||||||
|
Loading…
Reference in New Issue
Block a user