1
0
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:
Matthias Kretschmann 2022-12-06 10:21:01 +00:00
parent 85e183929f
commit dcfae1332c
Signed by: m
GPG Key ID: 606EEEF3C479A91F
14 changed files with 40 additions and 45 deletions

View File

@ -31,7 +31,7 @@ export default function ExplorerLink({
href={`${url}/${path}`}
title={`View on ${oceanConfig?.explorerUri}`}
target="_blank"
rel="noreferrer"
rel="noopener noreferrer"
className={`${styles.link} ${className || ''}`}
>
{children} <External />

View File

@ -94,7 +94,7 @@ export default function AssetSelection({
className={styles.link}
href={`/asset/${asset.did}`}
target="_blank"
rel="noreferrer"
rel="noopener noreferrer"
>
<External />
</a>

View File

@ -1,7 +1,7 @@
import { useAsset } from '@context/Asset'
import React from 'react'
import { useWeb3 } from '@context/Web3'
import { calicaUri } from 'app.config'
import { calicaUri } from '../../../../../app.config'
export default function CalicaIntegration() {
const { isOwner } = useAsset()
const { accountId } = useWeb3()
@ -10,12 +10,10 @@ export default function CalicaIntegration() {
<a
href={`${calicaUri}/${accountId}`}
target="_blank"
rel="noreferrer"
rel="noopener noreferrer"
title="Use Calica for revenue split"
>
Use Calica for revenue split
</a>
) : (
<></>
)
) : null
}

View File

@ -1,7 +1,6 @@
.consume {
width: auto;
margin-bottom: calc(var(--spacer) / 2);
margin-top: -1rem;
}
.info {

View File

@ -2,5 +2,4 @@
composes: box from '@shared/atoms/Box.module.css';
max-width: 35rem;
margin: auto;
padding: 0;
}

View File

@ -2,7 +2,6 @@ import React, { ReactElement, useState, useEffect } from 'react'
import Compute from './Compute'
import Download from './Download'
import { FileInfo, LoggerInstance, Datatoken } from '@oceanprotocol/lib'
import Tabs, { TabsItem } from '@shared/atoms/Tabs'
import { compareAsBN } from '@utils/numbers'
import { useAsset } from '@context/Asset'
import { useWeb3 } from '@context/Web3'
@ -16,7 +15,7 @@ import { useFormikContext } from 'formik'
import { FormPublishData } from '@components/Publish/_types'
import { getTokenBalanceFromSymbol } from '@utils/web3'
import AssetStats from './AssetStats'
import CalicaIntegration from './CalicaIntegration'
import Calica from './Calica'
export default function AssetActions({
asset
@ -133,8 +132,9 @@ export default function AssetActions({
}
}, [balance, accountId, asset?.accessDetails, dtBalance])
const UseContent = (
return (
<>
<div className={styles.actions}>
{isCompute ? (
<Compute
asset={asset}
@ -151,16 +151,9 @@ export default function AssetActions({
fileIsLoading={fileIsLoading}
/>
)}
<CalicaIntegration />
<AssetStats />
</>
)
const tabs: TabsItem[] = [{ title: 'Use', content: UseContent }]
return (
<>
<Tabs items={tabs} className={styles.actions} />
</div>
<Calica />
<Web3Feedback
networkId={asset?.chainId}
accountId={accountId}

View File

@ -9,7 +9,7 @@ const SampleButton = ({ url }: { url: string }) => (
<Button
href={url}
target="_blank"
rel="noreferrer"
rel="noopener noreferrer"
download
style="text"
size="small"

View File

@ -65,7 +65,7 @@ export default function NftTooltip({
<a
href={openSeaUrl}
target="_blank"
rel="noreferrer"
rel="noopener noreferrer"
className={explorerLinkStyles.link}
>
View on OpenSea <External />

View File

@ -14,7 +14,7 @@ export default function BuildId(): ReactElement {
isMainBranch ? commitId : commitBranch
}`}
target="_blank"
rel="noreferrer"
rel="noopener noreferrer"
title="Build ID referring to the linked commit hash."
>
{isMainBranch ? commitId.substring(0, 7) : commitBranch}

View File

@ -26,6 +26,7 @@ export default function Footer(): ReactElement {
size="small"
href="https://oceanprotocol.com"
target="_blank"
rel="noopener noreferrer"
>
Ocean Protocol <External className={styles.svg} />
</Button>

View File

@ -17,7 +17,13 @@ export default function Links() {
<div className={styles.links}>
{content.links.map(({ name, url }) => (
<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 />
</Button>
{' — '}

View File

@ -59,7 +59,7 @@ export default function PublisherLinks({
href={getLinkData(link).href}
key={link.key}
target="_blank"
rel="noreferrer"
rel="noopener noreferrer"
>
{getLinkData(link).label}{' '}
<External className={styles.linksExternal} />

View File

@ -13,7 +13,7 @@ const isDescriptionTextClamped = () => {
const LinkExternal = ({ url, text }: { url: string; text: string }) => {
return (
<a href={url} target="_blank" rel="noreferrer">
<a href={url} target="_blank" rel="noopener noreferrer">
{text}
</a>
)

View File

@ -26,8 +26,7 @@ function Asset({
<a
className={styles.assetLink}
href={`/asset/${did}`}
target="_blank"
rel="noreferrer"
rel="noopener noreferrer"
>
<External />
</a>