Skip to content

Commit 0a124e7

Browse files
authored
Merge branch 'dev' into fix(web)/write-functions-to-viem
2 parents e14322e + c584078 commit 0a124e7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

web/src/hooks/queries/useCourtPolicy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import { useIPFSQuery } from "../useIPFSQuery";
33

44
export const useCourtPolicy = (courtID?: string) => {
55
const { data: policyURI } = useCourtPolicyURI(courtID);
6-
return useIPFSQuery(policyURI);
6+
return useIPFSQuery(policyURI?.court?.policy ?? "");
77
};

web/src/hooks/useIPFSQuery.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ export const useIPFSQuery = (ipfsPath?: string) => {
55
() => (ipfsPath !== undefined ? ipfsPath : false),
66
async () => {
77
if (ipfsPath) {
8-
return fetch(`https://cloudflare-ipfs.com${ipfsPath}`).then(
9-
async (res) => await res.json()
10-
);
8+
return fetch(`https://cloudflare-ipfs.com${ipfsPath}`).then(async (res) => await res.json());
119
} else throw Error;
1210
}
1311
);

0 commit comments

Comments
 (0)