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

wrapping asset in permission component

This commit is contained in:
Jamie Hewitt 2021-05-21 14:46:39 +03:00
parent ec21af94a6
commit 22fc17c66c

View File

@ -1,4 +1,5 @@
import React, { ReactElement, useEffect, useState } from 'react' import React, { ReactElement, useEffect, useState } from 'react'
import Permission from '../../components/organisms/Permission'
import { PageProps } from 'gatsby' import { PageProps } from 'gatsby'
import PageTemplateAssetDetails from '../../components/templates/PageAssetDetails' import PageTemplateAssetDetails from '../../components/templates/PageAssetDetails'
import AssetProvider from '../../providers/Asset' import AssetProvider from '../../providers/Asset'
@ -11,8 +12,10 @@ export default function PageGatsbyAssetDetails(props: PageProps): ReactElement {
}, [props.location.pathname]) }, [props.location.pathname])
return ( return (
<AssetProvider asset={did}> <Permission eventType="browse">
<PageTemplateAssetDetails uri={props.location.pathname} /> <AssetProvider asset={did}>
</AssetProvider> <PageTemplateAssetDetails uri={props.location.pathname} />
</AssetProvider>
</Permission>
) )
} }