Skip to content

Commit

Permalink
Merge pull request #393 from unitaryfund/385_same_social_links
Browse files Browse the repository at this point in the history
Consistency for social icons
  • Loading branch information
vprusso authored Jan 24, 2022
2 parents 63cb7c4 + 7abf38d commit 0cd1368
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/components/SubmissionBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import OverlayTrigger from 'react-bootstrap/OverlayTrigger'
import Tooltip from 'react-bootstrap/Tooltip'
import { faThumbsUp, faExternalLinkAlt, faScroll, faCode } from '@fortawesome/free-solid-svg-icons'
import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons'
import logo from './../images/metriq_logo_secondary_blue.png'
import ErrorHandler from './ErrorHandler'

library.add(faThumbsUp, faExternalLinkAlt)
library.add(faExternalLinkAlt)

class SubmissionBox extends React.Component {
constructor (props) {
Expand Down Expand Up @@ -68,11 +68,11 @@ class SubmissionBox extends React.Component {
parseContentUrl () {
const urlStr = String(this.props.item.contentUrl)
if (urlStr.includes('arxiv')) {
return <span> <FontAwesomeIcon icon={faScroll} /> arXiv:{urlStr.split('/abs/')[1]} </span>
return <span> <FontAwesomeIcon icon={faExternalLinkAlt} /> arXiv:{urlStr.split('/abs/')[1]} </span>
} else if (urlStr.includes('github')) {
return <span> <FontAwesomeIcon icon={faCode} /> GitHub:{urlStr.split('.com/')[1]} </span>
return <span> <FontAwesomeIcon icon={faExternalLinkAlt} /> GitHub:{urlStr.split('.com/')[1]} </span>
} else {
return ''
return <span> <FontAwesomeIcon icon={faExternalLinkAlt} /> Link:{urlStr} </span>
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/views/Submission.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import { Accordion, Button, Card, Modal } from 'react-bootstrap'
import { Link } from 'react-router-dom'
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faEdit, faExternalLinkAlt, faThumbsUp, faPlus, faTrash, faMobileAlt, faStickyNote, faSuperscript } from '@fortawesome/free-solid-svg-icons'
import { faEdit, faExternalLinkAlt, faHeart, faPlus, faTrash, faMobileAlt, faStickyNote, faSuperscript } from '@fortawesome/free-solid-svg-icons'

library.add(faEdit, faExternalLinkAlt, faThumbsUp, faPlus, faTrash, faMobileAlt, faStickyNote, faSuperscript)
library.add(faEdit, faExternalLinkAlt, faHeart, faPlus, faTrash, faMobileAlt, faStickyNote, faSuperscript)

const dateRegex = /^\d{4}-\d{2}-\d{2}$/
const metricNameRegex = /.{1,}/
Expand Down Expand Up @@ -621,7 +621,7 @@ class Submission extends React.Component {
<div className='row'>
<div className='col-md-12'>
<OverlayTrigger placement='top' overlay={props => <Tooltip {...props}>Upvote submission</Tooltip>}>
<button className={'submission-button btn ' + (this.state.item.isUpvoted ? 'btn-primary' : 'btn-secondary')} onClick={this.handleUpVoteOnClick}><FontAwesomeIcon icon='thumbs-up' /> {this.state.item.upvotesCount}</button>
<button className={'submission-button btn ' + (this.state.item.isUpvoted ? 'btn-primary' : 'btn-secondary')} onClick={this.handleUpVoteOnClick}><FontAwesomeIcon icon='heart' /> {this.state.item.upvotesCount}</button>
</OverlayTrigger>
<OverlayTrigger placement='top' overlay={props => <Tooltip {...props}>Submission link</Tooltip>}>
<button className='submission-button btn btn-secondary' onClick={() => { window.open(this.state.item.contentUrl, '_blank') }}><FontAwesomeIcon icon={faExternalLinkAlt} /></button>
Expand Down

0 comments on commit 0cd1368

Please sign in to comment.