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

wrapping asset actions in permissions element

This commit is contained in:
Jamie Hewitt 2021-05-20 17:31:25 +03:00
parent adb5a2fdc3
commit 6d037abeec
2 changed files with 22 additions and 14 deletions

View File

@ -1,4 +1,5 @@
import React, { ReactElement, useState, useEffect } from 'react' import React, { ReactElement, useState, useEffect } from 'react'
import Permission from '../Permission'
import styles from './index.module.css' import styles from './index.module.css'
import Compute from './Compute' import Compute from './Compute'
import Consume from './Consume' import Consume from './Consume'
@ -89,5 +90,9 @@ export default function AssetActions(): ReactElement {
} }
) )
return <Tabs items={tabs} className={styles.actions} /> return (
<Permission eventType="purchase">
<Tabs items={tabs} className={styles.actions} />
</Permission>
)
} }

View File

@ -1,4 +1,5 @@
import React, { ReactNode, ReactElement } from 'react' import React, { ReactNode, ReactElement } from 'react'
import Permission from '../organisms/Permission'
import PageHeader from '../molecules/PageHeader' import PageHeader from '../molecules/PageHeader'
import Seo from '../atoms/Seo' import Seo from '../atoms/Seo'
import Container from '../atoms/Container' import Container from '../atoms/Container'
@ -21,19 +22,21 @@ export default function Page({
headerCenter headerCenter
}: PageProps): ReactElement { }: PageProps): ReactElement {
return ( return (
<> <Permission eventType="browse">
<Seo title={title} description={description} uri={uri} /> <>
<Seo title={title} description={description} uri={uri} />
<Container> <Container>
{title && !noPageHeader && ( {title && !noPageHeader && (
<PageHeader <PageHeader
title={title} title={title}
description={description} description={description}
center={headerCenter} center={headerCenter}
/> />
)} )}
{children} {children}
</Container> </Container>
</> </>
</Permission>
) )
} }