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:
commit
d594c4cdfe
@ -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>
|
||||||
)
|
)
|
||||||
|
@ -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} />
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1 @@
|
|||||||
{
|
{ "rewrites": [{ "source": "/asset/:did", "destination": "/asset/" }] }
|
||||||
"cleanUrls": true,
|
|
||||||
"trailingSlash": false
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user