Skip to content

Commit

Permalink
Merge branch 'dev' into fix(web)/write-functions-to-viem
Browse files Browse the repository at this point in the history
  • Loading branch information
alcercu authored Jun 28, 2023
2 parents e14322e + c584078 commit 0a124e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/src/hooks/queries/useCourtPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { useIPFSQuery } from "../useIPFSQuery";

export const useCourtPolicy = (courtID?: string) => {
const { data: policyURI } = useCourtPolicyURI(courtID);
return useIPFSQuery(policyURI);
return useIPFSQuery(policyURI?.court?.policy ?? "");
};
4 changes: 1 addition & 3 deletions web/src/hooks/useIPFSQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ export const useIPFSQuery = (ipfsPath?: string) => {
() => (ipfsPath !== undefined ? ipfsPath : false),
async () => {
if (ipfsPath) {
return fetch(`https://cloudflare-ipfs.com${ipfsPath}`).then(
async (res) => await res.json()
);
return fetch(`https://cloudflare-ipfs.com${ipfsPath}`).then(async (res) => await res.json());
} else throw Error;
}
);
Expand Down

0 comments on commit 0a124e7

Please sign in to comment.