-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from EmmanuelDemey/lerna
Modularisation (pour Nico)
- Loading branch information
Showing
24 changed files
with
272 additions
and
297 deletions.
There are no files selected for viewing
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...u/classifications/classifications.spec.js → ...ssifications/menu/classifications.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../components/menu/classifications/index.js → .../components/classifications/menu/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import React from 'react'; | ||
import { Switch, Route } from 'react-router-dom'; | ||
|
||
import ClassificationsFamiliesContainer from 'js/components/classifications/families/home-container'; | ||
import ClassificationsFamilyContainer from 'js/components/classifications/families/visualization/home-container'; | ||
import ClassificationsSeriesContainer from 'js/components/classifications/series/home-container'; | ||
import ClassificationsOneSeriesContainer from 'js/components/classifications/series/visualization/home-container'; | ||
import ClassificationsContainer from 'js/components/classifications/home-container'; | ||
import ClassificationContainer from 'js/components/classifications/visualization/home-container'; | ||
import ClassificationItemsContainer from 'js/components/classifications/visualization/items/home-container'; | ||
import ClassificationTreeContainer from 'js/components/classifications/visualization/tree/home-container'; | ||
import ClassificationLevelContainer from 'js/components/classifications/level/home-container'; | ||
import ClassificationItemContainer from 'js/components/classifications/item/home-container'; | ||
import ClassificationItemCompareContainer from 'js/components/classifications/item/compare/home-container'; | ||
import ClassificationsCorrespondencesContainer from 'js/components/classifications/correspondences/home-container'; | ||
import ClassificationsCorrespondenceContainer from 'js/components/classifications/correspondences/visualization/home-container'; | ||
import ClassificationsCorrespondenceAssociationContainer from 'js/components/classifications/correspondences/association/home-container'; | ||
import D from 'js/i18n'; | ||
import Menu from 'js/components/classifications/menu'; | ||
|
||
export default () => { | ||
document.title = 'Bauhaus - ' + D.classificationsTitle; | ||
return ( | ||
<> | ||
<Menu /> | ||
<Switch> | ||
<Route | ||
exact | ||
path="/classifications/families" | ||
component={ClassificationsFamiliesContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/family/:id" | ||
component={ClassificationsFamilyContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/series" | ||
component={ClassificationsSeriesContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/series/:id" | ||
component={ClassificationsOneSeriesContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications" | ||
component={ClassificationsContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/classification/:id" | ||
component={ClassificationContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/classification/:id/items" | ||
component={ClassificationItemsContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/classification/:id/tree" | ||
component={ClassificationTreeContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/classification/:classificationId/level/:levelId" | ||
component={ClassificationLevelContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/classification/:classificationId/item/:itemId" | ||
component={ClassificationItemContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/classification/:classificationId/item/:itemId/compare" | ||
component={ClassificationItemCompareContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/correspondences" | ||
component={ClassificationsCorrespondencesContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/correspondence/:id" | ||
component={ClassificationsCorrespondenceContainer} | ||
/> | ||
<Route | ||
exact | ||
path="/classifications/correspondence/:correspondenceId/association/:associationId" | ||
component={ClassificationsCorrespondenceAssociationContainer} | ||
/> | ||
</Switch> | ||
</> | ||
); | ||
}; |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...components/menu/concepts/concepts.spec.js → ...components/concepts/menu/concepts.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
import React, { Component } from 'react'; | ||
import React from 'react'; | ||
import { connect } from 'react-redux'; | ||
import Menu from './home'; | ||
import * as select from 'js/reducers'; | ||
|
||
class MenuContainer extends Component { | ||
render() { | ||
const { permission } = this.props; | ||
return <Menu permission={permission} />; | ||
} | ||
} | ||
export function withPermissions(WrappedComponent) { | ||
const mapStateToProps = state => { | ||
const permission = select.getPermission(state); | ||
return { permission }; | ||
}; | ||
|
||
const mapStateToProps = state => { | ||
const permission = select.getPermission(state); | ||
return { permission }; | ||
}; | ||
class MenuContainer extends React.Component { | ||
render() { | ||
return ( | ||
<WrappedComponent | ||
permissions={this.props.permissions} | ||
{...this.props} | ||
/> | ||
); | ||
} | ||
} | ||
|
||
export default connect(mapStateToProps)(MenuContainer); | ||
return connect(mapStateToProps)(MenuContainer); | ||
} |
Oops, something went wrong.