-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6f9739
commit da7a79c
Showing
13 changed files
with
85 additions
and
162 deletions.
There are no files selected for viewing
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
23 changes: 2 additions & 21 deletions
23
frontend/src/pages/EnvironmentSettings/EnvironmentSettings.wrap.tsx
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,22 +1,3 @@ | ||
import { connect } from 'react-redux'; | ||
import { Dispatch } from 'redux'; | ||
import { RootState } from 'redux/types'; | ||
import EnvironmentSettings from './EnvironmentSettings'; | ||
|
||
import { setProjectToastrDisplay } from 'redux/entities/projects'; | ||
import { getProjectToastrDisplay } from 'redux/entities/projects/selectors'; | ||
import { ProjectToastrDisplayType } from 'redux/entities/projects/types'; | ||
import EnvironmentSettings, { OwnProps } from './EnvironmentSettings'; | ||
|
||
const mapStateToProps = (state: RootState, props: OwnProps) => ({ | ||
toastrDisplay: getProjectToastrDisplay(state), | ||
}); | ||
|
||
const mapDispatchToProps = (dispatch: Dispatch) => ({ | ||
setProjectToastrDisplay: (toastrDisplay: ProjectToastrDisplayType) => | ||
dispatch(setProjectToastrDisplay({ toastrDisplay })), | ||
}); | ||
|
||
export default connect( | ||
mapStateToProps, | ||
mapDispatchToProps, | ||
)(EnvironmentSettings); | ||
export default EnvironmentSettings; |
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
15 changes: 3 additions & 12 deletions
15
frontend/src/pages/GeneralSettings/GeneralSettings.wrap.tsx
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,26 +1,17 @@ | ||
import { connect } from 'react-redux'; | ||
import { Dispatch } from 'redux'; | ||
import { RootState } from 'redux/types'; | ||
|
||
import { editProjectDetailsRequest, setProjectToastrDisplay } from 'redux/entities/projects'; | ||
import { getProjectToastrDisplay } from 'redux/entities/projects/selectors'; | ||
import { ProjectToastrDisplayType } from 'redux/entities/projects/types'; | ||
import GeneralSettings, { OwnProps } from './GeneralSettings'; | ||
|
||
const mapStateToProps = (state: RootState, props: OwnProps) => ({ | ||
toastrDisplay: getProjectToastrDisplay(state), | ||
}); | ||
import { editProjectDetailsRequest } from 'redux/entities/projects'; | ||
import GeneralSettings from './GeneralSettings'; | ||
|
||
const mapDispatchToProps = (dispatch: Dispatch) => ({ | ||
setProjectToastrDisplay: (toastrDisplay: ProjectToastrDisplayType) => | ||
dispatch(setProjectToastrDisplay({ toastrDisplay })), | ||
editProjectDetailsRequest: ( | ||
projectId: string, | ||
payload: { name: string; wpt_api_key: string; wpt_instance_url: string }, | ||
) => dispatch(editProjectDetailsRequest({ projectId, payload })), | ||
}); | ||
|
||
export default connect( | ||
mapStateToProps, | ||
null, | ||
mapDispatchToProps, | ||
)(GeneralSettings); |
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
Oops, something went wrong.