prettier applied to all files in src/

This commit is contained in:
dannyrb committed 2019-05-29 08:39:54 -04:00
1 parent 433bb219b0
commit fb7c229b43
69 files changed
+1128 -1116

No files matched your search

+8 -8
View File
@@ -1,21 +1,21 @@
import { connect } from 'react-redux'
import { connect } from 'react-redux';
import StudyListWithData from './StudyListWithData.js'
import StudyListWithData from './StudyListWithData.js';
const isActive = a => a.active === true
const isActive = a => a.active === true;
const mapStateToProps = state => {
const activeServer = state.servers.servers.find(isActive)
const activeServer = state.servers.servers.find(isActive);
return {
server: activeServer,
user: state.oidc.user,
}
}
};
};
const ConnectedStudyList = connect(
mapStateToProps,
null
)(StudyListWithData)
)(StudyListWithData);
export default ConnectedStudyList
export default ConnectedStudyList;
+11 -13
View File
@@ -1,24 +1,22 @@
import React from "react";
import PropTypes from "prop-types";
import ConnectedStudyList from "./ConnectedStudyList";
import React from 'react';
import PropTypes from 'prop-types';
import ConnectedStudyList from './ConnectedStudyList';
// TODO: Move to react-viewerbase
function StudyListRouting({ match }) {
// TODO: Figure out which filters we want to pass in via a URL
//const { patientId } = match.params;
// TODO: Figure out which filters we want to pass in via a URL
//const { patientId } = match.params;
return (
<ConnectedStudyList/>
);
return <ConnectedStudyList />;
}
StudyListRouting.propTypes = {
match: PropTypes.shape({
params: PropTypes.shape({
patientIds: PropTypes.string,
})
})
match: PropTypes.shape({
params: PropTypes.shape({
patientIds: PropTypes.string,
}),
}),
};
export default StudyListRouting;
+6 -6
View File
@@ -10,14 +10,14 @@ class StudyListWithData extends Component {
state = {
searchData: {},
studies: null,
error: null
error: null,
};
static propTypes = {
patientId: PropTypes.string,
server: PropTypes.object,
user: PropTypes.object,
history: PropTypes.object
history: PropTypes.object,
};
static rowsPerPage = 25;
@@ -42,7 +42,7 @@ class StudyListWithData extends Component {
rowsPerPage: StudyListWithData.rowsPerPage,
studyDateFrom: StudyListWithData.defaultStudyDateFrom,
studyDateTo: StudyListWithData.defaultStudyDateTo,
sortData: StudyListWithData.defaultSort
sortData: StudyListWithData.defaultSort,
}
) => {
const { server } = this.props;
@@ -55,7 +55,7 @@ class StudyListWithData extends Component {
studyDateFrom: searchData.studyDateFrom,
studyDateTo: searchData.studyDateTo,
limit: searchData.rowsPerPage,
offset: searchData.currentPage * searchData.rowsPerPage
offset: searchData.currentPage * searchData.rowsPerPage,
};
// TODO: add sorting
@@ -97,12 +97,12 @@ class StudyListWithData extends Component {
});
this.setState({
studies: sortedStudies
studies: sortedStudies,
});
})
.catch(error => {
this.setState({
error: true
error: true,
});
throw new Error(error);