Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
iainnash committed Apr 21, 2024
1 parent 1806374 commit 46e4ed2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useLoadProposalFromQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useLoadProposalFromQuery = () => {
const [params] = useSearchParams();

useEffect(() => {
const targets = params.get(queryKeys[targets])?.split("|");
const targets = params.get(queryKeys["targets"])?.split("|");
const calldatas = params.get(queryKeys["calldatas"])?.split("|");
const values = params.get(queryKeys["values"])?.split("|");
const nonce = params.get(queryKeys["nonce"]);
Expand All @@ -38,7 +38,7 @@ export const useLoadProposalFromQuery = () => {

console.log({ actions, txt: "setting proposal" });

setProposal({ actions, ...(nonce ? {[queryKeys.nonce]: nonce} : {}) });
setProposal({ actions, ...(nonce ? { [queryKeys.nonce]: nonce } : {}) });

Check failure on line 41 in src/hooks/useLoadProposalFromQuery.ts

View workflow job for this annotation

GitHub Actions / build

Argument of type '{ nonce?: string | undefined; actions: { to: string; data: string; value: string; }[]; }' is not assignable to parameter of type 'SetStateAction<Proposal | undefined>'.
}
}, [params, setProposal]);

Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useUpdateProposalViaQuery.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useCallback, useContext } from "react";
import { Proposal } from "../schemas/proposal";
import { ProposalContext } from "../app/NewSafeProposal";
import { useSetParamsFromQuery } from "./useSetParamsFromQuery";
import { useRedirectToProposalWithNewParams } from "./useSetParamsFromQuery";

export const useUpdateProposalViaQuery = () => {
const setParams = useSetParamsFromQuery();
const setParams = useRedirectToProposalWithNewParams();
const proposal = useContext(ProposalContext);

return useCallback(
Expand Down

0 comments on commit 46e4ed2

Please sign in to comment.