mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
* install 3box Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * tinkering * check tweak * load library on init only * add profile Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * get 3box profile Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix return type Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove console.log * fix travis Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix eslit Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix travis Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * 3box data structure tweaks, prepare output in byline * refactor * new Publisher component * tweaks * remove data partners * link/profile splitup * profile tweaks * component splitup * lots of styling, add image * affordance for publisher, refactor, server response tinkering * use 3Box proxy * open all 3box links in new tab/window * mobile fixes Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
31 lines
854 B
TypeScript
31 lines
854 B
TypeScript
import React, { ReactElement } from 'react'
|
|
import styles from './PublisherLinks.module.css'
|
|
import { ProfileLink } from '../../../models/Profile'
|
|
import { ReactComponent as External } from '../../../images/external.svg'
|
|
|
|
export default function PublisherLinks({
|
|
links
|
|
}: {
|
|
links: ProfileLink[]
|
|
}): ReactElement {
|
|
return (
|
|
<div className={styles.links}>
|
|
{' — '}
|
|
{links?.map((link: ProfileLink) => {
|
|
const href =
|
|
link.name === 'Twitter'
|
|
? `https://twitter.com/${link.value}`
|
|
: link.name === 'GitHub'
|
|
? `https://github.com/${link.value}`
|
|
: link.value
|
|
|
|
return (
|
|
<a href={href} key={link.name} target="_blank" rel="noreferrer">
|
|
{link.name} <External className={styles.linksExternal} />
|
|
</a>
|
|
)
|
|
})}
|
|
</div>
|
|
)
|
|
}
|