mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
remove tabs, more rel for all links
This commit is contained in:
parent
85e183929f
commit
dcfae1332c
@ -31,7 +31,7 @@ export default function ExplorerLink({
|
|||||||
href={`${url}/${path}`}
|
href={`${url}/${path}`}
|
||||||
title={`View on ${oceanConfig?.explorerUri}`}
|
title={`View on ${oceanConfig?.explorerUri}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noopener noreferrer"
|
||||||
className={`${styles.link} ${className || ''}`}
|
className={`${styles.link} ${className || ''}`}
|
||||||
>
|
>
|
||||||
{children} <External />
|
{children} <External />
|
||||||
|
@ -94,7 +94,7 @@ export default function AssetSelection({
|
|||||||
className={styles.link}
|
className={styles.link}
|
||||||
href={`/asset/${asset.did}`}
|
href={`/asset/${asset.did}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
<External />
|
<External />
|
||||||
</a>
|
</a>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { useAsset } from '@context/Asset'
|
import { useAsset } from '@context/Asset'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { useWeb3 } from '@context/Web3'
|
import { useWeb3 } from '@context/Web3'
|
||||||
import { calicaUri } from 'app.config'
|
import { calicaUri } from '../../../../../app.config'
|
||||||
export default function CalicaIntegration() {
|
export default function CalicaIntegration() {
|
||||||
const { isOwner } = useAsset()
|
const { isOwner } = useAsset()
|
||||||
const { accountId } = useWeb3()
|
const { accountId } = useWeb3()
|
||||||
@ -10,12 +10,10 @@ export default function CalicaIntegration() {
|
|||||||
<a
|
<a
|
||||||
href={`${calicaUri}/${accountId}`}
|
href={`${calicaUri}/${accountId}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noopener noreferrer"
|
||||||
title="Use Calica for revenue split"
|
title="Use Calica for revenue split"
|
||||||
>
|
>
|
||||||
Use Calica for revenue split
|
Use Calica for revenue split
|
||||||
</a>
|
</a>
|
||||||
) : (
|
) : null
|
||||||
<></>
|
|
||||||
)
|
|
||||||
}
|
}
|
@ -1,7 +1,6 @@
|
|||||||
.consume {
|
.consume {
|
||||||
width: auto;
|
width: auto;
|
||||||
margin-bottom: calc(var(--spacer) / 2);
|
margin-bottom: calc(var(--spacer) / 2);
|
||||||
margin-top: -1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
|
@ -2,5 +2,4 @@
|
|||||||
composes: box from '@shared/atoms/Box.module.css';
|
composes: box from '@shared/atoms/Box.module.css';
|
||||||
max-width: 35rem;
|
max-width: 35rem;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ import React, { ReactElement, useState, useEffect } from 'react'
|
|||||||
import Compute from './Compute'
|
import Compute from './Compute'
|
||||||
import Download from './Download'
|
import Download from './Download'
|
||||||
import { FileInfo, LoggerInstance, Datatoken } from '@oceanprotocol/lib'
|
import { FileInfo, LoggerInstance, Datatoken } from '@oceanprotocol/lib'
|
||||||
import Tabs, { TabsItem } from '@shared/atoms/Tabs'
|
|
||||||
import { compareAsBN } from '@utils/numbers'
|
import { compareAsBN } from '@utils/numbers'
|
||||||
import { useAsset } from '@context/Asset'
|
import { useAsset } from '@context/Asset'
|
||||||
import { useWeb3 } from '@context/Web3'
|
import { useWeb3 } from '@context/Web3'
|
||||||
@ -16,7 +15,7 @@ import { useFormikContext } from 'formik'
|
|||||||
import { FormPublishData } from '@components/Publish/_types'
|
import { FormPublishData } from '@components/Publish/_types'
|
||||||
import { getTokenBalanceFromSymbol } from '@utils/web3'
|
import { getTokenBalanceFromSymbol } from '@utils/web3'
|
||||||
import AssetStats from './AssetStats'
|
import AssetStats from './AssetStats'
|
||||||
import CalicaIntegration from './CalicaIntegration'
|
import Calica from './Calica'
|
||||||
|
|
||||||
export default function AssetActions({
|
export default function AssetActions({
|
||||||
asset
|
asset
|
||||||
@ -133,34 +132,28 @@ export default function AssetActions({
|
|||||||
}
|
}
|
||||||
}, [balance, accountId, asset?.accessDetails, dtBalance])
|
}, [balance, accountId, asset?.accessDetails, dtBalance])
|
||||||
|
|
||||||
const UseContent = (
|
|
||||||
<>
|
|
||||||
{isCompute ? (
|
|
||||||
<Compute
|
|
||||||
asset={asset}
|
|
||||||
dtBalance={dtBalance}
|
|
||||||
file={fileMetadata}
|
|
||||||
fileIsLoading={fileIsLoading}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<Download
|
|
||||||
asset={asset}
|
|
||||||
dtBalance={dtBalance}
|
|
||||||
isBalanceSufficient={isBalanceSufficient}
|
|
||||||
file={fileMetadata}
|
|
||||||
fileIsLoading={fileIsLoading}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<CalicaIntegration />
|
|
||||||
<AssetStats />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
|
|
||||||
const tabs: TabsItem[] = [{ title: 'Use', content: UseContent }]
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Tabs items={tabs} className={styles.actions} />
|
<div className={styles.actions}>
|
||||||
|
{isCompute ? (
|
||||||
|
<Compute
|
||||||
|
asset={asset}
|
||||||
|
dtBalance={dtBalance}
|
||||||
|
file={fileMetadata}
|
||||||
|
fileIsLoading={fileIsLoading}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Download
|
||||||
|
asset={asset}
|
||||||
|
dtBalance={dtBalance}
|
||||||
|
isBalanceSufficient={isBalanceSufficient}
|
||||||
|
file={fileMetadata}
|
||||||
|
fileIsLoading={fileIsLoading}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<AssetStats />
|
||||||
|
</div>
|
||||||
|
<Calica />
|
||||||
<Web3Feedback
|
<Web3Feedback
|
||||||
networkId={asset?.chainId}
|
networkId={asset?.chainId}
|
||||||
accountId={accountId}
|
accountId={accountId}
|
||||||
|
@ -9,7 +9,7 @@ const SampleButton = ({ url }: { url: string }) => (
|
|||||||
<Button
|
<Button
|
||||||
href={url}
|
href={url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noopener noreferrer"
|
||||||
download
|
download
|
||||||
style="text"
|
style="text"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -65,7 +65,7 @@ export default function NftTooltip({
|
|||||||
<a
|
<a
|
||||||
href={openSeaUrl}
|
href={openSeaUrl}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noopener noreferrer"
|
||||||
className={explorerLinkStyles.link}
|
className={explorerLinkStyles.link}
|
||||||
>
|
>
|
||||||
View on OpenSea <External />
|
View on OpenSea <External />
|
||||||
|
@ -14,7 +14,7 @@ export default function BuildId(): ReactElement {
|
|||||||
isMainBranch ? commitId : commitBranch
|
isMainBranch ? commitId : commitBranch
|
||||||
}`}
|
}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noopener noreferrer"
|
||||||
title="Build ID referring to the linked commit hash."
|
title="Build ID referring to the linked commit hash."
|
||||||
>
|
>
|
||||||
{isMainBranch ? commitId.substring(0, 7) : commitBranch}
|
{isMainBranch ? commitId.substring(0, 7) : commitBranch}
|
||||||
|
@ -26,6 +26,7 @@ export default function Footer(): ReactElement {
|
|||||||
size="small"
|
size="small"
|
||||||
href="https://oceanprotocol.com"
|
href="https://oceanprotocol.com"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
Ocean Protocol <External className={styles.svg} />
|
Ocean Protocol <External className={styles.svg} />
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -17,7 +17,13 @@ export default function Links() {
|
|||||||
<div className={styles.links}>
|
<div className={styles.links}>
|
||||||
{content.links.map(({ name, url }) => (
|
{content.links.map(({ name, url }) => (
|
||||||
<Fragment key={name}>
|
<Fragment key={name}>
|
||||||
<Button style="text" size="small" href={url} target="_blank">
|
<Button
|
||||||
|
style="text"
|
||||||
|
size="small"
|
||||||
|
href={url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
{name} <External />
|
{name} <External />
|
||||||
</Button>
|
</Button>
|
||||||
{' — '}
|
{' — '}
|
||||||
|
@ -59,7 +59,7 @@ export default function PublisherLinks({
|
|||||||
href={getLinkData(link).href}
|
href={getLinkData(link).href}
|
||||||
key={link.key}
|
key={link.key}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
{getLinkData(link).label}{' '}
|
{getLinkData(link).label}{' '}
|
||||||
<External className={styles.linksExternal} />
|
<External className={styles.linksExternal} />
|
||||||
|
@ -13,7 +13,7 @@ const isDescriptionTextClamped = () => {
|
|||||||
|
|
||||||
const LinkExternal = ({ url, text }: { url: string; text: string }) => {
|
const LinkExternal = ({ url, text }: { url: string; text: string }) => {
|
||||||
return (
|
return (
|
||||||
<a href={url} target="_blank" rel="noreferrer">
|
<a href={url} target="_blank" rel="noopener noreferrer">
|
||||||
{text}
|
{text}
|
||||||
</a>
|
</a>
|
||||||
)
|
)
|
||||||
|
@ -26,8 +26,7 @@ function Asset({
|
|||||||
<a
|
<a
|
||||||
className={styles.assetLink}
|
className={styles.assetLink}
|
||||||
href={`/asset/${did}`}
|
href={`/asset/${did}`}
|
||||||
target="_blank"
|
rel="noopener noreferrer"
|
||||||
rel="noreferrer"
|
|
||||||
>
|
>
|
||||||
<External />
|
<External />
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user