mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-02-22 03:31:17 +00:00
* Updated dependencies - React update needed transformation of React.createClass to ES2015 classes - removed some deprecations/deprecated packages - added mulitple @types Dependencies to devDependencies for IDE code completion support * added Docker related files - Dockerfile with build container - docker-compose.yml with mongodb and app
35 lines
913 B
JavaScript
35 lines
913 B
JavaScript
import React from "react";
|
|
import { array } from "prop-types";
|
|
import { CompletedGather } from "javascripts/components/gather";
|
|
|
|
class ArchivedGathers extends React.Component {
|
|
static propTypes = {
|
|
archive: array.isRequired,
|
|
maps: array.isRequired
|
|
}
|
|
|
|
render = () => {
|
|
let archive = this.props.archive
|
|
.sort((a, b) => {
|
|
return new Date(b.createdAt) - new Date(a.createdAt);
|
|
})
|
|
.map((archivedGather, index) => {
|
|
return <CompletedGather
|
|
key={archivedGather.gather.done.time}
|
|
show={(index === 0) ? true : false}
|
|
gather={archivedGather.gather}
|
|
maps={this.props.maps} />
|
|
});
|
|
|
|
return (
|
|
<div className="panel panel-primary">
|
|
<div className="panel-heading">Archived Gathers</div>
|
|
<div className="panel-body">
|
|
{archive}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export { ArchivedGathers }
|