diff --git a/src/SetList/SetResults.js b/src/SetList/SetResults.js
index 7dc0085..24a7397 100644
--- a/src/SetList/SetResults.js
+++ b/src/SetList/SetResults.js
@@ -41,49 +41,63 @@ export default class SetResult extends Component {
return href;
};
- renderClassifications = (classification) => {
+ renderClassification = (classification) => {
const properties = Object.keys(classification);
return properties.map((property, index) => {
const files = Object.keys(classification[property]);
return (
-
- {property}
-
+ { this.renderClassificationProperty(property) }
-
-
-
-
- File
-
-
- Headers Classified
-
-
-
-
- {files.map((file, index) => {
- const headers = classification[property][file];
- return (
-
-
- {file}
-
-
- {headers.join(', ')}
-
-
- );
- })}
-
-
+ { this.renderClassificationTable(files, classification, property) }
);
});
};
+ renderClassificationTable(files, classification, property) {
+ return
+ {this.renderClassificationHeader()}
+ {this.renderClassificationDetails(files, classification, property)}
+
;
+ }
+
+ renderClassificationDetails(files, classification, property) {
+ return
+ {files.map((file, index) => {
+ const headers = classification[property][file];
+ return (
+
+ {file}
+
+
+ {headers.join(', ')}
+
+ );
+ })}
+ ;
+ }
+
+ renderClassificationProperty(property) {
+ return
+ {property}
+ ;
+ }
+
+ renderClassificationHeader() {
+ return
+
+
+ File
+
+
+ Headers Classified
+
+
+ ;
+ }
+
render() {
return (
<>
@@ -104,7 +118,7 @@ export default class SetResult extends Component {
- {this.renderClassifications(this.state.results)}
+ {this.renderClassification(this.state.results)}