File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ import { useIPFSQuery } from "../useIPFSQuery";
33
44export const useCourtPolicy = ( courtID ?: string ) => {
55 const { data : policyURI } = useCourtPolicyURI ( courtID ) ;
6- return useIPFSQuery ( policyURI ) ;
6+ return useIPFSQuery ( policyURI ?. court ?. policy ?? "" ) ;
77} ;
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments