Skip to content
Snippets Groups Projects
Unverified Commit ba098133 authored by Tomasz Knapik's avatar Tomasz Knapik
Browse files

Add submissions list heading

parent 609d81b1
No related branches found
No related tags found
No related merge requests found
......@@ -34,9 +34,7 @@ class SubmissionsByRoundApp extends React.Component {
}
renderSubmissionsByRound() {
return <div>
<SubmissionsByRoundContainer />
</div>;
return <SubmissionsByRoundContainer />;
}
}
......
import React from 'react';
import SubmissionsByRoundListHeading from '@components/SubmissionsByRoundListHeading';
export default class SubmissionsByRoundList extends React.Component {
renderListItems() {
return this.props.items.map(v => {
const applications = [];
return (
<>
<SubmissionsByRoundListHeading key="status-{v.title}" title={v.title} count={v.applications.length} />
<ul>
{applications}
</ul>
</>
);
});
}
render() {
return (
<ul>
{this.renderListItems()}
</ul>
);
}
}
import React from 'react';
import PropTypes from 'prop-types';
export default class SubmissionsByRoundListHeading extends React.Component {
render() {
return (
<li>
<h2>{this.props.title}</h2>
</li>
);
}
}
SubmissionsByRoundListHeading.propTypes = {
title: PropTypes.string,
count: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
};
import React from 'react';
import SubmissionsByRoundList from '@components/SubmissionsByRoundList';
export default class SubmissionsByRoundContainer extends React.Component {
render() {
const mockItems = [
{
title: "Test stage 1",
applications: [],
},
{
title: "Test stage 2 blabla",
applications: [],
},
];
return (
<div>
<h2>Submissions by round container</h2>
</div>
<>
<SubmissionsByRoundList items={mockItems} />
</>
);
}
}
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -23,6 +23,7 @@
"gulp-touch-cmd": "0.0.1",
"gulp-uglify": "^3.0.1",
"node-sass-import-once": "^1.2.0",
"prop-types": "^15.6.2",
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment