make description clickable link

This commit is contained in:
Barry Gitarts 2019-08-23 12:43:53 -04:00 committed by Barry G
parent e799192307
commit 5555b3ba1d
2 changed files with 7 additions and 3 deletions

View File

@ -72,14 +72,17 @@ function ListProjects({ classes }) {
const cellStyling = isOdd(i) ? classnames(cellText) : classnames(cellText, classes.cellColor) const cellStyling = isOdd(i) ? classnames(cellText) : classnames(cellText, classes.cellColor)
const spaceClass = isOdd(i) ? nameSpacer : classnames(nameSpacer, cellColor) const spaceClass = isOdd(i) ? nameSpacer : classnames(nameSpacer, cellColor)
const creationDate = getDateFromTimestamp(creationTime) const creationDate = getDateFromTimestamp(creationTime)
const profileUrl = `/fund-project/${profileId}`
return ( return (
<Fragment key={id}> <Fragment key={id}>
<Cell spacerClass={spaceClass} textClass={classnames(classes.headerName, cellStyling)} text={title} /> <Cell spacerClass={spaceClass} textClass={classnames(classes.headerName, cellStyling)} text={title} />
<Typography className={classnames(classes.headerDescription, cellStyling, classes.cellDescription)}>{subtitle}</Typography> <Link to={profileUrl} className={classnames(classes.headerDescription, cellStyling, classes.cellDescription)}>
<Typography className={classes.px16}>{subtitle}</Typography>
</Link>
<FundingDetail classes={classes} pledgesInfos={pledgesInfos} goal={goal} goalToken={goalToken} cellStyling={cellStyling} /> <FundingDetail classes={classes} pledgesInfos={pledgesInfos} goal={goal} goalToken={goalToken} cellStyling={cellStyling} />
<Typography className={classnames(classes.headerContact, cellStyling, classes.cellDescription)}>{creator}</Typography> <Typography className={classnames(classes.headerContact, cellStyling, classes.cellDescription)}>{creator}</Typography>
<Typography className={classnames(classes.dateCreated, cellStyling, classes.cellDescription)}>{creationDate}</Typography> <Typography className={classnames(classes.dateCreated, cellStyling, classes.cellDescription)}>{creationDate}</Typography>
<Link to={`/fund-project/${profileId}`} className={classnames(classes.readMore, cellStyling)}> <Link to={profileUrl} className={classnames(classes.readMore, cellStyling)}>
<Typography className={classnames(classes.blue, classes.px15)}>Read more</Typography> <Typography className={classnames(classes.blue, classes.px15)}>Read more</Typography>
</Link> </Link>
</Fragment> </Fragment>

View File

@ -39,7 +39,8 @@ const styles = theme => ({
textAlign: 'center' textAlign: 'center'
}, },
cellDescription: { cellDescription: {
fontSize: '1rem' fontSize: '1rem',
textDecoration: 'none'
}, },
cellColor: { cellColor: {
background: '#F5F7F8' background: '#F5F7F8'