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:
parent
373551ab57
commit
1ba97aedcb
2 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ export const MarketCardComponent = ({ data }: { data: FlowComponent }) => {
|
|||
|
||||
useEffect(() => {
|
||||
setAdded(savedFlows.has(data.id) ? true : false);
|
||||
}, [added]);
|
||||
}, [savedFlows]);
|
||||
|
||||
function handleAdd() {
|
||||
setLoading(true);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export default function StorePage(): JSX.Element {
|
|||
}, []);
|
||||
|
||||
const handleGetComponents = () => {
|
||||
getStoreComponents(1, 10)
|
||||
getStoreComponents(1, 1000)
|
||||
.then((res) => {
|
||||
setSearchData(res);
|
||||
setLoading(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue