Skip to content

Commit

Permalink
feat(webapp): info and open on new tab implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
fvives99 committed Nov 24, 2022
1 parent 05c7d28 commit 72538ea
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 24 deletions.
Empty file modified wallet/Dockerfile
100755 → 100644
Empty file.
Empty file modified wallet/config/config.ini
100755 → 100644
Empty file.
Empty file modified wallet/postman-collection.json
100755 → 100644
Empty file.
59 changes: 35 additions & 24 deletions webapp/src/components/InformationCard/ProducerInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React, { memo, useState } from 'react'
import PropTypes from 'prop-types'
import Link from '@mui/material/Link'
import Typography from '@mui/material/Typography'
import ListAltIcon from '@mui/icons-material/ListAlt'
import { Popover } from '@mui/material'

import CountryFlag from '../CountryFlag'
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
import LaunchIcon from '@mui/icons-material/Launch';

const ProducerInformation = ({ info, classes, t }) => {
console.log(info)
Expand Down Expand Up @@ -52,35 +52,44 @@ const ProducerInformation = ({ info, classes, t }) => {
value={info?.email}
href={`mailto:${info.email}`}
/>
<div className={classes.infoItems}>
{!!info?.ownership ? (
<Link href={info?.ownership} target="_blank" rel="noreferrer">
<Typography variant="body1">
{t('ownershipDisclosure')}
</Typography>
</Link>
) : null}

{!!info?.code_of_conduct ? (
<Link href={info?.code_of_conduct} target="_blank" rel="noreferrer">
<Typography variant="body1">{t('codeofconduct')}</Typography>
</Link>
) : null}
{!!info?.ownership ? (
<RowUrl title={t('ownershipDisclosure')} value={info?.ownership} />

{!!info?.chain ? (
<Link href={info?.chain} target="_blank" rel="noreferrer">
<Typography variant="body1">{t('chainResources')}</Typography>
</Link>
) : null}
</div>
{!!info?.otherResources?.length && (
) : null}

{!!info?.code_of_conduct ? (
<RowUrl title={t('codeofconduct')} value={info?.code_of_conduct} />


) : null}

{!!info?.chain ? (
<><><Typography variant="body1" className={classes.textEllipsis}>
{t('chainResources')}
</Typography>
<LaunchIcon>onClick={info.chain}</LaunchIcon>
<InfoOutlinedIcon onClick={openPopover}></InfoOutlinedIcon></><Popover
className={classes.shadow}
open={Boolean(anchor)}
onClose={() => setAnchor(null)}
anchorEl={anchor}
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
transformOrigin={{ vertical: 'bottom', horizontal: 'left' }}
><Link target="_blank" rel="noopener noreferrer">{info.chain}</Link>
</Popover></>

) : null}


{!!info?.otherResources.length && (
<div className={classes.rowWrapper}>
<dt className={classes.dt}>
<Typography variant="body1" className={classes.textEllipsis}>
{t('otherResources')}
</Typography>
</dt>
<ListAltIcon onClick={openPopover}></ListAltIcon>
<InfoOutlinedIcon onClick={openPopover}></InfoOutlinedIcon>
<Popover
className={classes.shadow}
open={Boolean(anchor)}
Expand All @@ -92,13 +101,15 @@ const ProducerInformation = ({ info, classes, t }) => {
{info.otherResources.map((url, i) => (
<div className={classes.dd} key={i}>
<Link href={url} target="_blank" rel="noopener noreferrer">
{url}
{info?.otherResources}
</Link>
</div>
))}
</Popover>
</div>
)}


</div>
</>
)
Expand Down

0 comments on commit 72538ea

Please sign in to comment.