From 397f867f2b09e2c50e576b097d70628d6a0a2e9f Mon Sep 17 00:00:00 2001 From: Hope87 Date: Tue, 29 Jun 2021 18:09:33 +0300 Subject: [PATCH] fixed code --- src/components/Description/Description.js | 2 +- src/components/Home/Home.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Description/Description.js b/src/components/Description/Description.js index c2000125..f3bef20b 100644 --- a/src/components/Description/Description.js +++ b/src/components/Description/Description.js @@ -49,7 +49,7 @@ const Description = ({ candidatesListArr, getCandidate, onLoadMore }) => {
- +
diff --git a/src/components/Home/Home.js b/src/components/Home/Home.js index 0ca542bd..9d235d9d 100644 --- a/src/components/Home/Home.js +++ b/src/components/Home/Home.js @@ -32,7 +32,7 @@ const Home = ({ getCandidate }) => { const [tags, setTags] = useState([]); const [profiles, setProfiles] = useState([]); const [selectedTab, setSelectedTab] = useState(''); - const [countArr, setCountArr] = useState(0); + const [countArr, setCountArr] = useState(2); const [candidatesArray, setCandidatesArray] = useState([]); useEffect(() => { @@ -88,7 +88,7 @@ const Home = ({ getCandidate }) => { }); }, []); - const shorthandArray = candidatesArray.slice(countArr, 2); + const shorthandArray = candidatesArray.slice(0, countArr); const loadMore = (count) => { setCountArr((prev) => prev + count);