fix(market-card.tsx): remove duplicate setLoading(true) call in handleAdd function to prevent unnecessary loading state changes
This commit is contained in:
parent
6ccb166417
commit
8c4b88a49a
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue