fix(market-card.tsx): remove duplicate setLoading(true) call in handleAdd function to prevent unnecessary loading state changes

This commit is contained in:
anovazzi1 2023-10-24 21:03:13 -03:00
commit 8c4b88a49a

View file

@ -29,6 +29,7 @@ export const MarketCardComponent = ({ data }: { data: FlowComponent }) => {
}, [added]);
function handleAdd() {
setLoading(true);
getComponent(data.id).then(
(res) => {
console.log(res);
@ -160,7 +161,6 @@ export const MarketCardComponent = ({ data }: { data: FlowComponent }) => {
size="sm"
className="whitespace-nowrap "
onClick={() => {
setLoading(true);
if (!added) {
handleAdd();
} else {