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";
3
3
4
4
export const useCourtPolicy = ( courtID ?: string ) => {
5
5
const { data : policyURI } = useCourtPolicyURI ( courtID ) ;
6
- return useIPFSQuery ( policyURI ) ;
6
+ return useIPFSQuery ( policyURI ?. court ?. policy ?? "" ) ;
7
7
} ;
Original file line number Diff line number Diff line change @@ -5,9 +5,7 @@ export const useIPFSQuery = (ipfsPath?: string) => {
5
5
( ) => ( ipfsPath !== undefined ? ipfsPath : false ) ,
6
6
async ( ) => {
7
7
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 ( ) ) ;
11
9
} else throw Error ;
12
10
}
13
11
) ;
You can’t perform that action at this time.
0 commit comments