Skip to content

Commit

Permalink
fix navigating to proposal (works with a set id)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barukimang committed Jul 8, 2024
1 parent a9ec745 commit ad5bd26
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/containers/transactionDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ const TransactionDetail: React.FC = () => {

const {data: proposal} = useProposal({
pluginType: plugins?.[0].id as PluginTypes,
id: proposalId?.toString() ?? '',
// id: proposalId?.toString() ?? '',
id: '0x3e3c5b75ef8c9f3b0e245395a4e64987b92bef81_0xe', //pieter: set id to debug navigating to proposal
});

const handleNavigateToProposal = useCallback(() => {
navigate(
generatePath(Proposal, {
network,
dao: toDisplayEns(ensDomain) ?? daoName,
id: proposalId!.toUrlSlug(), // only called for Withdrawals
})
);
const path = generatePath(Proposal, {
network,
dao: ensDomain || daoDetails?.address,
id: proposal?.id,
});
navigate(path);
onClose();
}, [ensDomain, daoName, navigate, network, onClose, proposalId]);

Check warning on line 61 in src/containers/transactionDetail/index.tsx

View workflow job for this annotation

GitHub Actions / build-and-test

React Hook useCallback has missing dependencies: 'daoDetails?.address' and 'proposal?.id'. Either include them or remove the dependency array

Expand Down

0 comments on commit ad5bd26

Please sign in to comment.