Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
maltheism committed Nov 25, 2021
1 parent ad28109 commit 6d56db9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/genomic_browser/jsx/tabs_content/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Files extends Component {
},
};
this.fetchData = this.fetchData.bind(this);
this.formatColumn = this.formatColumn.bind(this);
this.openFileUploadModal = this.openFileUploadModal.bind(this);
this.closeFileUploadModal = this.closeFileUploadModal.bind(this);
this.renderFileUploadForm = this.renderFileUploadForm.bind(this);
Expand Down Expand Up @@ -150,10 +151,12 @@ class Files extends Component {
*/
formatColumn(column, cell, rowData, rowHeaders) {
let reactElement;
console.log(rowData);
switch (column) {
case 'PSCID':
const url = `${this.props.baseURL}/${rowData.DCCID}/`;
reactElement = <td><a href={url}>{rowData.PSCID}</a></td>;
case 'Name':
const url = `${this.props.baseURL}${rowData.Name}`;
const fileName = rowData.Name.split('/').pop();
reactElement = <td><a href={url}>{fileName}</a></td>;
break;
case 'Subproject':
reactElement = <td>{this.state.data.subprojects[parseInt(cell)]}</td>;
Expand Down Expand Up @@ -258,12 +261,10 @@ class Files extends Component {
);
}
}

Files.defaultProps = {
display: false,
data: null,
};

Files.propTypes = {
display: PropTypes.bool,
data: PropTypes.object,
Expand Down

0 comments on commit 6d56db9

Please sign in to comment.