1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

Merge pull request #78 from oceanprotocol/fix/vercel-404-test

Fix direct asset URLs
This commit is contained in:
Matthias Kretschmann 2020-09-14 17:17:38 +02:00 committed by GitHub
commit d594c4cdfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 6 deletions

View File

@ -2,7 +2,7 @@ import React, { useState, useEffect, ReactElement } from 'react'
import { Router } from '@reach/router' import { Router } from '@reach/router'
import AssetContent from '../../components/organisms/AssetContent' import AssetContent from '../../components/organisms/AssetContent'
import Layout from '../../components/Layout' import Layout from '../../components/Layout'
import { MetadataMarket, ServiceMetadataMarket } from '../../@types/Metadata' import { MetadataMarket } from '../../@types/Metadata'
import { MetadataStore, Logger, DDO } from '@oceanprotocol/lib' import { MetadataStore, Logger, DDO } from '@oceanprotocol/lib'
import Alert from '../../components/atoms/Alert' import Alert from '../../components/atoms/Alert'
import Loader from '../../components/atoms/Loader' import Loader from '../../components/atoms/Loader'
@ -61,7 +61,7 @@ export default function PageTemplateAssetDetails({
<Alert title={title} text={error} state="error" /> <Alert title={title} text={error} state="error" />
</Layout> </Layout>
) : ( ) : (
<Layout title="Loading..." uri={uri}> <Layout title={undefined} uri={uri}>
<Loader /> <Loader />
</Layout> </Layout>
) )

View File

@ -4,5 +4,6 @@ import PageTemplateAssetDetails from '../../components/templates/AssetDetails'
export default function PageGatsbyAssetDetails(props: PageProps): ReactElement { export default function PageGatsbyAssetDetails(props: PageProps): ReactElement {
const did = props.location.pathname.split('/')[2] const did = props.location.pathname.split('/')[2]
return <PageTemplateAssetDetails did={did} uri={props.location.pathname} /> return <PageTemplateAssetDetails did={did} uri={props.location.pathname} />
} }

View File

@ -1,4 +1 @@
{ { "rewrites": [{ "source": "/asset/:did", "destination": "/asset/" }] }
"cleanUrls": true,
"trailingSlash": false
}