Skip to content

Commit

Permalink
fix: remove bad proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
creed-victor committed Nov 11, 2024
1 parent 4566750 commit db4d5b8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/rude-carrots-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'frontend': patch
---

chore: remove bad proposal
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export const useGetProposals = () => {
if (!data) {
return [];
}

return data.proposals;
return data.proposals.filter(
item => item.id !== '0x6496df39d000478a7a7352c01e0e713835051ccd-47',
);
}, [data]);

return { loading, data: list as Proposal[] };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ export const useGetProposalById = (id: string) => {
},
});

const proposal = useMemo(
() => data?.proposal as Proposal | undefined,
[data],
);
const proposal = useMemo(() => {
const item = data?.proposal as Proposal | undefined;
return item && item.id !== '0x6496df39d000478a7a7352c01e0e713835051ccd-47'
? item
: undefined;
}, [data]);

return { loading, proposal, refetch };
};

0 comments on commit db4d5b8

Please sign in to comment.