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