diff --git a/src/app/[lang]/case/[id]/page.tsx b/src/app/[lang]/case/[id]/page.tsx index 7af91ac..d5c711a 100644 --- a/src/app/[lang]/case/[id]/page.tsx +++ b/src/app/[lang]/case/[id]/page.tsx @@ -44,7 +44,7 @@ export default async function Page({ params: { lang, id } }: DisputePageProps) { period={dispute.period} nbChoices={+dispute.nbChoices > 10 ? undefined : +dispute.nbChoices} lastPeriodChange={dispute.lastPeriodChangeTs} - metaEvidence={metaEvidence} + metaEvidence={metaEvidence ?? null} evidenceList={evidence} justifications={justifications} nbJurors={ diff --git a/src/utils/index.ts b/src/utils/index.ts index 2b1d691..3ddfe18 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -4,9 +4,13 @@ import { isAddress } from "ethers"; export const ipfs = (uri: string) => `${process.env.NEXT_PUBLIC_IPFS_ENDPOINT}${uri}`; -export const ipfsFetcher = async (ipfsURI: string): Promise => { - const res = await axios.get(ipfs(ipfsURI)); - return res.data; +export const ipfsFetcher = async (ipfsURI: string): Promise => { + try { + const res = await axios.get(ipfs(ipfsURI)); + return res.data; + } catch { + return undefined; + } }; export const explorerLink = (address: string) =>