fix(market-card.tsx): fix useEffect dependency array to depend on savedFlows instead of added to ensure correct behavior

feat(index.tsx): increase the number of components fetched from the store from 10 to 1000 to improve user experience
This commit is contained in:
anovazzi1 2023-10-25 17:31:53 -03:00
commit 1ba97aedcb
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ export const MarketCardComponent = ({ data }: { data: FlowComponent }) => {
useEffect(() => {
setAdded(savedFlows.has(data.id) ? true : false);
}, [added]);
}, [savedFlows]);
function handleAdd() {
setLoading(true);

View file

@ -61,7 +61,7 @@ export default function StorePage(): JSX.Element {
}, []);
const handleGetComponents = () => {
getStoreComponents(1, 10)
getStoreComponents(1, 1000)
.then((res) => {
setSearchData(res);
setLoading(false);