diff --git a/src/components/SubmissionBoxSmall.js b/src/components/SubmissionBoxSmall.js
new file mode 100644
index 00000000..a0964f68
--- /dev/null
+++ b/src/components/SubmissionBoxSmall.js
@@ -0,0 +1,25 @@
+import React from 'react'
+import { Link } from 'react-router-dom'
+import { library } from '@fortawesome/fontawesome-svg-core'
+import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons'
+
+library.add(faExternalLinkAlt)
+
+const SubmissionBoxSmall = (props) =>
+
+
+
+
+
+
{(props.item.name.length > 80) ? (props.item.name.substring(0, 77) + '...') : props.item.name}
+
+
+
+
+ Submitted by {props.item.username}
+
+
+
+
+
+export default SubmissionBoxSmall
diff --git a/src/components/SubmissionScroll.js b/src/components/SubmissionScroll.js
index 57aa9ce8..f2d6bc16 100644
--- a/src/components/SubmissionScroll.js
+++ b/src/components/SubmissionScroll.js
@@ -6,6 +6,7 @@ import FormFieldValidator from './FormFieldValidator'
import FormFieldAlertRow from './FormFieldAlertRow'
import FormFieldWideRow from './FormFieldWideRow'
import FormFieldTypeaheadRow from './FormFieldTypeaheadRow'
+import SubmissionBoxSmall from './SubmissionBoxSmall'
const InfiniteScroll = React.lazy(() => import('react-infinite-scroll-component'))
const SubmissionBox = React.lazy(() => import('./SubmissionBox'))
@@ -48,7 +49,7 @@ class SubmissionScroll extends React.Component {
nextPage: 1,
items,
filterOptions,
- filteredItems: items
+ filteredItems: this.props.isSmall ? items.slice(0, 3) : items
})
})
.catch(err => {
@@ -111,26 +112,35 @@ class SubmissionScroll extends React.Component {
render () {
return (
-
-
this.onFilter(value)}
- alignLabelRight
- />
+
+ {!this.props.isSmall &&
+ this.onFilter(value)}
+ alignLabelRight
+ />}
- {this.state.items.length && (
+ {this.props.isSmall && this.state.items.length &&
+ this.state.filteredItems.map((item, index) =>
+ )}
+ {!this.props.isSmall && this.state.items.length && (
Loading...
}>
Loading...}
- endMessage={You have seen all submissions.
}
+ endMessage={this.props.isSmall ? : You have seen all submissions.
}
>
{this.state.filteredItems.map((item, index) =>
You have no submissions, yet.
: There are no approved submissions, yet.
)}
-
-
-
-
+ {!this.props.isSmall &&
+
+
+
+
+
+ }
)
}
diff --git a/src/components/SubscribeButton.js b/src/components/SubscribeButton.js
index fbfc157c..9e8b5094 100644
--- a/src/components/SubscribeButton.js
+++ b/src/components/SubscribeButton.js
@@ -1,16 +1,56 @@
+import React, { useState } from 'react'
+import axios from 'axios'
import { Button } from 'react-bootstrap'
+import { useHistory } from 'react-router-dom'
import TooltipTrigger from './TooltipTrigger'
+import config from '../config'
+import ErrorHandler from './ErrorHandler'
-const SubscribeButton = (props) =>
-
- {!props.isSubscribed &&
-
- Follow
- }
- {props.isSubscribed &&
-
- Unfollow
- }
-
+const SubscribeButton = (props) => {
+ const history = useHistory()
+ const [isSubscribed, setIsSubscribed] = useState(props.item.isSubscribed)
+
+ const handleLoginRedirect = (type) => {
+ if (type === 'tag') {
+ history.push('/Login/Tags')
+ } else if (type === 'task') {
+ history.push('/Login/Tasks')
+ } else if (type === 'method') {
+ history.push('/Login/Methods')
+ } else if (type === 'platform') {
+ history.push('/Login/Platforms')
+ }
+ }
+ const handleSubscribe = () => {
+ if (props.isLoggedIn) {
+ axios.post(config.api.getUriPrefix() + '/' + props.type + '/' + (props.type === 'tag' ? encodeURIComponent(props.item.name) : props.item.id) + '/subscribe', {})
+ .then(res => {
+ if (props.type === 'tag') {
+ setIsSubscribed(res.data.data)
+ } else {
+ setIsSubscribed(!!res.data.data.isSubscribed)
+ }
+ })
+ .catch(err => {
+ window.alert('Error: ' + ErrorHandler(err) + '\nSorry! Check your connection and login status, and try again.')
+ })
+ } else {
+ handleLoginRedirect(props.type)
+ }
+ }
+
+ return (
+
+ {!isSubscribed &&
+
+ Follow
+ }
+ {isSubscribed &&
+
+ Unfollow
+ }
+
+ )
+}
export default SubscribeButton
diff --git a/src/components/TopSubmitters.js b/src/components/TopSubmitters.js
new file mode 100644
index 00000000..e9b93ab2
--- /dev/null
+++ b/src/components/TopSubmitters.js
@@ -0,0 +1,158 @@
+import React, { useEffect, useState } from 'react'
+import axios from 'axios'
+import { Tabs, Tab } from 'react-bootstrap'
+import config from '../config'
+import SortingTable from '../components/SortingTable'
+
+const TopSubmitters = (props) => {
+ const [data, setData] = useState({ weekly: [], monthly: [], allTime: [] })
+ useEffect(() => {
+ if (data.allTime.length) {
+ return
+ }
+ axios.get(config.api.getUriPrefix() + '/user/topSubmitters')
+ .then(res => {
+ const tSubmitters = res.data.data
+ tSubmitters.weekly[0].rank = '🥇'
+ tSubmitters.weekly[1].rank = '🥈'
+ tSubmitters.weekly[2].rank = '🥉'
+ tSubmitters.monthly[0].rank = '🥇'
+ tSubmitters.monthly[1].rank = '🥈'
+ tSubmitters.monthly[2].rank = '🥉'
+ tSubmitters.allTime[0].rank = '🥇'
+ tSubmitters.allTime[1].rank = '🥈'
+ tSubmitters.allTime[2].rank = '🥉'
+
+ const ts = { weekly: [], monthly: [], allTime: [] }
+ for (let i = 0; i < 3; ++i) {
+ if (tSubmitters.weekly[i].submissionsCount > 0) {
+ ts.weekly.push(tSubmitters.weekly[i])
+ }
+ if (tSubmitters.monthly[i].submissionsCount > 0) {
+ ts.monthly.push(tSubmitters.monthly[i])
+ }
+ if (tSubmitters.allTime[i].submissionsCount > 0) {
+ ts.allTime.push(tSubmitters.allTime[i])
+ }
+ }
+
+ setData(ts)
+ })
+ })
+ return (
+
+ Top Submitters
+ {props.isOnlyAllTime &&
+ this.props.history.push('/User/' + record.id + '/Submissions')}
+ tableLayout='auto'
+ rowClassName='link'
+ />}
+ {!props.isOnlyAllTime &&
+
+ {(data.weekly.length > 0) &&
+
+ this.props.history.push('/User/' + record.id + '/Submissions')}
+ tableLayout='auto'
+ rowClassName='link'
+ />
+ }
+ {(data.monthly.length > 0) &&
+
+ this.props.history.push('/User/' + record.id + '/Submissions')}
+ tableLayout='auto'
+ rowClassName='link'
+ />
+ }
+ {(data.allTime.length > 0) &&
+
+ this.props.history.push('/User/' + record.id + '/Submissions')}
+ tableLayout='auto'
+ rowClassName='link'
+ />
+ }
+ }
+
+ )
+}
+
+export default TopSubmitters
diff --git a/src/components/ViewHeader.js b/src/components/ViewHeader.js
index 0dfeda98..5ed8a05c 100644
--- a/src/components/ViewHeader.js
+++ b/src/components/ViewHeader.js
@@ -1,2 +1,2 @@
-const ViewHeader = (props) =>
+const ViewHeader = (props) =>
export default ViewHeader
diff --git a/src/components/ViewSubHeader.js b/src/components/ViewSubHeader.js
index e317ff8a..d18e8438 100644
--- a/src/components/ViewSubHeader.js
+++ b/src/components/ViewSubHeader.js
@@ -1,2 +1,2 @@
-const ViewSubHeader = (props) =>
+const ViewSubHeader = (props) =>
export default ViewSubHeader
diff --git a/src/components/simple-react-footer/SimpleReactFooter.js b/src/components/simple-react-footer/SimpleReactFooter.js
index 8488ded3..e591cba6 100644
--- a/src/components/simple-react-footer/SimpleReactFooter.js
+++ b/src/components/simple-react-footer/SimpleReactFooter.js
@@ -50,8 +50,8 @@ class SimpleReactFooter extends React.Component {
- Quantum computing benchmarks by
community contributors made with
by
-
+ Quantum computing benchmarks by
community contributors made with
by
+
Stay up to date on metriq.info! Subscribe now to our newsletter:
- Follow us on social media
-
+ Follow us on social media
+
{(this.props.facebook !== undefined || this.props.linkedin !== undefined || this.props.instagram !== undefined || this.props.twitter !== undefined || this.props.pinterest !== undefined || this.props.youtube !== undefined) &&
{this.props.facebook !== undefined ?
: ''}
diff --git a/src/views/Home.js b/src/views/Home.js
index d918794f..cf1095f2 100644
--- a/src/views/Home.js
+++ b/src/views/Home.js
@@ -1,213 +1,249 @@
import axios from 'axios'
+import React from 'react'
+import { Button, Tab, Tabs } from 'react-bootstrap'
import config from '../config'
import ErrorHandler from '../components/ErrorHandler'
-import React, { useEffect, useState, Suspense } from 'react'
-import { Tabs, Tab } from 'react-bootstrap'
-import { useHistory, useParams } from 'react-router-dom'
-import ViewHeader from '../components/ViewHeader'
-import SubmissionScroll from '../components/SubmissionScroll'
+import FormFieldValidator from '../components/FormFieldValidator'
+import FormFieldTypeaheadRow from '../components/FormFieldTypeaheadRow'
+import CategoryScroll from '../components/CategoryScroll'
+import CategoryItemIcon from '../components/CategoryItemIcon'
+import CategoryItemBox from '../components/CategoryItemBox'
import SubscribeButton from '../components/SubscribeButton'
-const SortingTable = React.lazy(() => import('../components/SortingTable'))
+import FormFieldAlertRow from '../components/FormFieldAlertRow'
+import FormFieldWideRow from '../components/FormFieldWideRow'
+import { sortCommon, sortAlphabetical } from '../components/SortFunctions'
+import SotaChart from '../components/SotaChart'
+import { withRouter, Link } from 'react-router-dom'
+import { library } from '@fortawesome/fontawesome-svg-core'
+import { faHeart, faExternalLinkAlt, faChartLine } from '@fortawesome/free-solid-svg-icons'
+import TopSubmitters from '../components/TopSubmitters'
+import SubmissionScroll from '../components/SubmissionScroll'
-// See https://stackoverflow.com/questions/71663319/react-navigate-to-react-bootstrap-tab-with-history#answer-71668423
-const DEFAULT_INITIAL_TAB = 'Trending'
+library.add(faHeart, faExternalLinkAlt, faChartLine)
-const Home = (props) => {
- const { tag } = useParams()
- const history = useHistory()
- const [activeTab, setActiveTab] = useState(DEFAULT_INITIAL_TAB)
- const [isSubscribed, setIsSubscribed] = useState(false)
- const [topSubmitters, setTopSubmitters] = useState({ weekly: [], monthly: [], allTime: [] })
+const qedcIds = [34, 2, 97, 142, 150, 172, 173, 174, 175, 176, 177, 178, 179]
- useEffect(() => {
- axios.get(config.api.getUriPrefix() + '/user/topSubmitters')
- .then(res => {
- const tSubmitters = res.data.data
- tSubmitters.weekly[0].rank = '🥇'
- tSubmitters.weekly[1].rank = '🥈'
- tSubmitters.weekly[2].rank = '🥉'
- tSubmitters.monthly[0].rank = '🥇'
- tSubmitters.monthly[1].rank = '🥈'
- tSubmitters.monthly[2].rank = '🥉'
- tSubmitters.allTime[0].rank = '🥇'
- tSubmitters.allTime[1].rank = '🥈'
- tSubmitters.allTime[2].rank = '🥉'
-
- const ts = { weekly: [], monthly: [], allTime: [] }
- for (let i = 0; i < 3; ++i) {
- if (tSubmitters.weekly[i].submissionsCount > 0) {
- ts.weekly.push(tSubmitters.weekly[i])
- }
- if (tSubmitters.monthly[i].submissionsCount > 0) {
- ts.monthly.push(tSubmitters.monthly[i])
- }
- if (tSubmitters.allTime[i].submissionsCount > 0) {
- ts.allTime.push(tSubmitters.allTime[i])
- }
- }
+class Home extends React.Component {
+ constructor (props) {
+ super(props)
+ this.state = {
+ isLoading: true,
+ alphabetical: [],
+ allNames: [],
+ platforms: [],
+ featured: [],
+ trending: [],
+ popular: [],
+ latest: [],
+ topSubmitters: [],
+ activeTab: 'Trending',
+ filterId: null,
+ requestFailedMessage: ''
+ }
- setTopSubmitters(ts)
- })
+ this.handleOnFilter = this.handleOnFilter.bind(this)
+ this.handleOnSelect = this.handleOnSelect.bind(this)
+ }
- if (!props.tabKey) {
- window.scrollTo(0, 0)
- history.replace(tag ? `/Tag/${tag}/${DEFAULT_INITIAL_TAB}` : `/Submissions/${DEFAULT_INITIAL_TAB}`)
+ handleOnFilter (value) {
+ if (value) {
+ this.setState({ filterId: value.id })
}
- setActiveTab(props.tabKey)
+ }
- if (!props.match) {
- return
+ handleOnSelect (value) {
+ if (value) {
+ this.props.history.push('/Task/' + value.id)
}
+ }
- axios.get(config.api.getUriPrefix() + '/tag/' + encodeURIComponent(props.match.params.tag))
+ componentDidMount () {
+ axios.get(config.api.getUriPrefix() + '/task/submissionCount')
.then(res => {
- setIsSubscribed(res.data.data.isSubscribed)
+ const alphabetical = res.data.data
+ alphabetical.sort(sortAlphabetical)
+ this.setState({ alphabetical, isLoading: false })
})
.catch(err => {
- window.alert('Error: ' + ErrorHandler(err) + '\nSorry! Check your connection and login status, and try again.')
+ this.setState({ requestFailedMessage: ErrorHandler(err) })
})
- }, [props, history, tag])
- const toggle = (tab) => {
- if (props.tabKey !== tab) {
- history.replace(tag ? `/Tag/${tag}/${tab}` : `/Submissions/${tab}`)
- }
- setActiveTab(tab)
- }
-
- const handleLoginRedirect = () => {
- props.history.push('/Login/' + encodeURIComponent('Tag/' + props.match.params.tag + '/' + props.tabKey))
- }
-
- const handleSubscribe = () => {
- if (props.isLoggedIn) {
- axios.post(config.api.getUriPrefix() + '/tag/' + encodeURIComponent(props.match.params.tag) + '/subscribe', {})
- .then(res => {
- setIsSubscribed(res.data.data)
+ axios.get(config.api.getUriPrefix() + '/task/names')
+ .then(res => {
+ this.setState({
+ requestFailedMessage: '',
+ allNames: res.data.data
})
- .catch(err => {
- window.alert('Error: ' + ErrorHandler(err) + '\nSorry! Check your connection and login status, and try again.')
+ })
+ .catch(err => {
+ this.setState({ requestFailedMessage: ErrorHandler(err) })
+ })
+
+ axios.get(config.api.getUriPrefix() + '/platform/submissionCount')
+ .then(res => {
+ const common = [...res.data.data]
+ common.sort(sortCommon)
+ const rws = []
+ for (let i = 0; i < 2; ++i) {
+ const row = []
+ for (let j = 0; j < 3; ++j) {
+ row.push(common[3 * i + j])
+ }
+ rws.push(row)
+ }
+ this.setState({
+ requestFailedMessage: '',
+ platforms: rws
})
- } else {
- handleLoginRedirect()
- }
+ })
+ .catch(err => {
+ this.setState({ requestFailedMessage: ErrorHandler(err) })
+ })
+
+ axios.get(config.api.getUriPrefix() + '/task/submissionCount/34')
+ .then(res => {
+ const featured = [res.data.data]
+
+ axios.get(config.api.getUriPrefix() + '/task/submissionCount/50')
+ .then(res => {
+ featured.push(res.data.data)
+
+ axios.get(config.api.getUriPrefix() + '/task/submissionCount/164')
+ .then(res => {
+ featured.push(res.data.data)
+ this.setState({ featured })
+ })
+ .catch(err => {
+ this.setState({ requestFailedMessage: ErrorHandler(err) })
+ })
+ })
+ .catch(err => {
+ this.setState({ requestFailedMessage: ErrorHandler(err) })
+ })
+ })
+ .catch(err => {
+ this.setState({ requestFailedMessage: ErrorHandler(err) })
+ })
}
- return (
-
-
Top Submitters
- Loading... }>
-
- {(topSubmitters.weekly.length > 0) &&
-
-
-
this.props.history.push('/User/' + record.id + '/Submissions')}
- tableLayout='auto'
- rowClassName='link'
- />
+ render () {
+ return (
+
+
Metriq is a platform for tracking and sharing quantum technology benchmarks. Users can make new submissions (link) that show the performance of different methods (link) on platforms (link) against tasks (link).
+
We have highlighted tasks here and you can search for more:
+
+
this.handleOnFilter(value)}
+ onSelect={this.handleOnSelect}
+ alignLabelRight
+ isRow
+ />
+
+
+
+
+ {this.state.featured.map((item, index) =>
+
+
+
+
+
+
+
+
+
+
+ {item.name}
+ {qedcIds.includes(parseInt(item.id)) &&
+ (QED-C) }
+
+
+ {item.description}
+
+
+
+
+ {item.parentTask.name}
+
+
+
+
+
+
+
+
+
+
+
+
+ )}
+
+
+
+
- }
- {(topSubmitters.monthly.length > 0) &&
-
-
-
this.props.history.push('/User/' + record.id + '/Submissions')}
- tableLayout='auto'
- rowClassName='link'
- />
+
+
+
Top Submissions
+ this.setState({ activeTab })}>
+
+
+
+
+
+
+
+
+
+
- }
- {(topSubmitters.allTime.length > 0) &&
-
-
- this.props.history.push('/User/' + record.id + '/Submissions')}
- tableLayout='auto'
- rowClassName='link'
- />
+
+
+
+
+
+ Platforms Explore tasks } />
+
+
+ {(this.state.platforms.length > 0) &&
+
+
+ Platforms See more platforms
+
+
+
+
+ {this.state.platforms.map((row, rid) =>
{row.map((item, id) => )}
)}
+
- }
-
-
-
-
-
- Top Submissions {props.match ? 'for "' + props.match.params.tag + '"' : ''}
- {props.match &&
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
+
+
+ }
+
+
+
+
+ )
+ }
}
-export default Home
+export default withRouter(Home)
diff --git a/src/views/Method.js b/src/views/Method.js
index cf9ce767..2b226380 100644
--- a/src/views/Method.js
+++ b/src/views/Method.js
@@ -38,7 +38,6 @@ class Method extends React.Component {
}
this.fetchData = this.fetchData.bind(this)
- this.handleSubscribe = this.handleSubscribe.bind(this)
this.handleShowEditModal = this.handleShowEditModal.bind(this)
this.handleHideEditModal = this.handleHideEditModal.bind(this)
this.handleEditModalDone = this.handleEditModalDone.bind(this)
@@ -50,20 +49,6 @@ class Method extends React.Component {
this.props.history.push('/Login/' + encodeURIComponent('Method/' + this.props.match.params.id))
}
- handleSubscribe () {
- if (this.props.isLoggedIn) {
- axios.post(config.api.getUriPrefix() + '/method/' + this.props.match.params.id + '/subscribe', {})
- .then(res => {
- this.setState({ item: res.data.data })
- })
- .catch(err => {
- window.alert('Error: ' + ErrorHandler(err) + '\nSorry! Check your connection and login status, and try again.')
- })
- } else {
- this.handleLoginRedirect()
- }
- }
-
handleShowEditModal () {
let mode = 'Edit'
if (!this.props.isLoggedIn) {
@@ -187,7 +172,7 @@ class Method extends React.Component {
-
+
diff --git a/src/views/Methods.js b/src/views/Methods.js
index 0fd0a9f0..fc9b6422 100644
--- a/src/views/Methods.js
+++ b/src/views/Methods.js
@@ -77,7 +77,7 @@ class Methods extends React.Component {
render () {
return (
-
+
Methods
Methods are the algorithms used in a submission.
diff --git a/src/views/Platform.js b/src/views/Platform.js
index d9397d22..b300b730 100644
--- a/src/views/Platform.js
+++ b/src/views/Platform.js
@@ -73,7 +73,6 @@ class Platform extends React.Component {
}
this.fetchData = this.fetchData.bind(this)
- this.handleSubscribe = this.handleSubscribe.bind(this)
this.handleAccordionToggle = this.handleAccordionToggle.bind(this)
this.handleShowEditModal = this.handleShowEditModal.bind(this)
this.handleHideEditModal = this.handleHideEditModal.bind(this)
@@ -98,20 +97,6 @@ class Platform extends React.Component {
this.props.history.push('/Login/' + encodeURIComponent('Platform/' + this.props.match.params.id))
}
- handleSubscribe () {
- if (this.props.isLoggedIn) {
- axios.post(config.api.getUriPrefix() + '/platform/' + this.props.match.params.id + '/subscribe', {})
- .then(res => {
- this.setState({ item: res.data.data })
- })
- .catch(err => {
- window.alert('Error: ' + ErrorHandler(err) + '\nSorry! Check your connection and login status, and try again.')
- })
- } else {
- this.handleLoginRedirect()
- }
- }
-
handleAccordionToggle () {
this.setState({ showAccordion: !this.state.showAccordion, isValidated: false })
}
@@ -440,7 +425,7 @@ class Platform extends React.Component {
-
+
diff --git a/src/views/Platforms.js b/src/views/Platforms.js
index c79a714b..93bfe5c0 100644
--- a/src/views/Platforms.js
+++ b/src/views/Platforms.js
@@ -77,7 +77,7 @@ class Platforms extends React.Component {
render () {
return (
-
+
Platforms
Platforms are the hardware devices used for a submission.
diff --git a/src/views/Submissions.js b/src/views/Submissions.js
new file mode 100644
index 00000000..215a3350
--- /dev/null
+++ b/src/views/Submissions.js
@@ -0,0 +1,76 @@
+import axios from 'axios'
+import config from '../config'
+import ErrorHandler from '../components/ErrorHandler'
+import React, { useEffect, useState, Suspense } from 'react'
+import { Tabs, Tab } from 'react-bootstrap'
+import { useHistory, useParams } from 'react-router-dom'
+import ViewHeader from '../components/ViewHeader'
+import SubmissionScroll from '../components/SubmissionScroll'
+import SubscribeButton from '../components/SubscribeButton'
+const TopSubmitters = React.lazy(() => import('../components/TopSubmitters'))
+
+// See https://stackoverflow.com/questions/71663319/react-navigate-to-react-bootstrap-tab-with-history#answer-71668423
+const DEFAULT_INITIAL_TAB = 'Trending'
+
+const Submissions = (props) => {
+ const { tag } = useParams()
+ const history = useHistory()
+ const [activeTab, setActiveTab] = useState(DEFAULT_INITIAL_TAB)
+ const [isSubscribed, setIsSubscribed] = useState(false)
+
+ useEffect(() => {
+ if (!props.tabKey) {
+ window.scrollTo(0, 0)
+ history.replace(tag ? `/Tag/${tag}/${DEFAULT_INITIAL_TAB}` : `/Submissions/${DEFAULT_INITIAL_TAB}`)
+ }
+ setActiveTab(props.tabKey)
+
+ if (!props.match) {
+ return
+ }
+
+ axios.get(config.api.getUriPrefix() + '/tag/' + encodeURIComponent(props.match.params.tag))
+ .then(res => {
+ setIsSubscribed(res.data.data.isSubscribed)
+ })
+ .catch(err => {
+ window.alert('Error: ' + ErrorHandler(err) + '\nSorry! Check your connection and login status, and try again.')
+ })
+ }, [props, history, tag])
+
+ const toggle = (tab) => {
+ if (props.tabKey !== tab) {
+ history.replace(tag ? `/Tag/${tag}/${tab}` : `/Submissions/${tab}`)
+ }
+ setActiveTab(tab)
+ }
+
+ return (
+
+ Loading...
}>
+
+
+
+
+
+ Top Submissions {props.match ? 'for "' + props.match.params.tag + '"' : ''}
+ {props.match &&
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default Submissions
diff --git a/src/views/Tags.js b/src/views/Tags.js
index 18fe3170..106bc245 100644
--- a/src/views/Tags.js
+++ b/src/views/Tags.js
@@ -48,7 +48,7 @@ class Tags extends React.Component {
render () {
return (
-
+
Tags
Tags are keywords assigned to a submission that enable retrieval by search.
diff --git a/src/views/Task.js b/src/views/Task.js
index 52c7ebe7..e144e8b2 100644
--- a/src/views/Task.js
+++ b/src/views/Task.js
@@ -43,7 +43,6 @@ class Task extends React.Component {
}
this.fetchData = this.fetchData.bind(this)
- this.handleSubscribe = this.handleSubscribe.bind(this)
this.handleShowEditModal = this.handleShowEditModal.bind(this)
this.handleHideEditModal = this.handleHideEditModal.bind(this)
this.handleEditModalDone = this.handleEditModalDone.bind(this)
@@ -58,20 +57,6 @@ class Task extends React.Component {
this.props.history.push('/Login/' + encodeURIComponent('Task/' + this.props.match.params.id))
}
- handleSubscribe () {
- if (this.props.isLoggedIn) {
- axios.post(config.api.getUriPrefix() + '/task/' + this.props.match.params.id + '/subscribe', {})
- .then(res => {
- this.setState({ item: res.data.data })
- })
- .catch(err => {
- window.alert('Error: ' + ErrorHandler(err) + '\nSorry! Check your connection and login status, and try again.')
- })
- } else {
- this.handleLoginRedirect()
- }
- }
-
handleShowEditModal () {
let mode = 'Edit'
if (!this.props.isLoggedIn) {
@@ -243,7 +228,7 @@ class Task extends React.Component {
-
+
diff --git a/src/views/Tasks.js b/src/views/Tasks.js
index 7d50d22d..130a0ef6 100644
--- a/src/views/Tasks.js
+++ b/src/views/Tasks.js
@@ -5,13 +5,15 @@ import ErrorHandler from '../components/ErrorHandler'
import FormFieldValidator from '../components/FormFieldValidator'
import FormFieldTypeaheadRow from '../components/FormFieldTypeaheadRow'
import CategoryScroll from '../components/CategoryScroll'
-import CategoryItemBox from '../components/CategoryItemBox'
import FormFieldAlertRow from '../components/FormFieldAlertRow'
import FormFieldWideRow from '../components/FormFieldWideRow'
import ViewHeader from '../components/ViewHeader'
import { sortAlphabetical } from '../components/SortFunctions'
-import SotaChart from '../components/SotaChart'
import { withRouter } from 'react-router-dom'
+import { library } from '@fortawesome/fontawesome-svg-core'
+import { faHeart, faExternalLinkAlt, faChartLine } from '@fortawesome/free-solid-svg-icons'
+
+library.add(faHeart, faExternalLinkAlt, faChartLine)
class Tasks extends React.Component {
constructor (props) {
@@ -20,10 +22,6 @@ class Tasks extends React.Component {
isLoading: true,
alphabetical: [],
allNames: [],
- featured: [],
- trending: [],
- popular: [],
- latest: [],
filterId: null,
requestFailedMessage: ''
}
@@ -65,65 +63,33 @@ class Tasks extends React.Component {
.catch(err => {
this.setState({ requestFailedMessage: ErrorHandler(err) })
})
-
- axios.get(config.api.getUriPrefix() + '/task/submissionCount/34')
- .then(res => {
- this.setState({ featured: [res.data.data] })
- })
- .catch(err => {
- this.setState({ requestFailedMessage: ErrorHandler(err) })
- })
}
render () {
return (
-
+
Tasks
-
Tasks are workloads of interest performed on a quantum computer.
-
Search the task hierarchy to see charts of comparative performance across methods, see our submitter leader board and featured task charts, or click into the parent/child task hierarchy through top-level task categories.
-
this.handleOnFilter(value)}
onSelect={this.handleOnSelect}
alignLabelRight
+ isRow
/>
-
- Featured
- {this.state.featured.map((item, index) => {
- return (
-
- )
- })}
-
+ Tasks are workloads of interest performed on a quantum computer.
+ Search the task hierarchy to see charts of comparative performance across methods or click into the parent/child task hierarchy through top-level task categories.
-
+
+