KarrLab / datanator_frontend

Graphical web-based interface for the Datanator toolkit for discovering data for modeling cells
https://datanator.info
MIT License
1 stars 1 forks source link

Why are data-type specific MetadataSection components exported with withRouter? #185

Closed yosefdroth closed 4 years ago

yosefdroth commented 4 years ago

I noticed that both the BaseMetadataSection and the data-type specific MetadataSection are exported wrapped by default wrapped in withRouter.

I see that the BaseMetadataSection requires withRouter for the history, but is withRouter necessary in the data-type specific MetadataSection components (e.g. src/scenes/BiochemicalEntityDetails/Protein/MetadataSection)? It would be simpler for testing if it can be exported without the withRouter.

jonrkarr commented 4 years ago

You're correct that this isn't necessary. withRouter is only needed for classes that need to access the history property. I have removed this.