forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove mm_config and mm_license global state from webapp, phase 2 (PR m…
…attermost#2) (mattermost#863) * MM-9635: expunge global mm_config from switch channel provider * MM-9635: expunge global mm_config from the root components, except for globally exporting it * MM-9635: fix incorrectly required customDescriptionText in email signup component * MM-9635: expunge global mm_config from various action files * MM-9635: deduplicate config/license code loading This preserves semantics, except for allowing a `loadCurrentLocale` even if config hasn't loaded, since this is safe.
- Loading branch information
1 parent
67ddf39
commit 78180eb
Showing
10 changed files
with
95 additions
and
72 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
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
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,18 @@ | ||
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved. | ||
// See License.txt for license information. | ||
|
||
import {connect} from 'react-redux'; | ||
import {getConfig} from 'mattermost-redux/selectors/entities/general'; | ||
|
||
import Root from './root.jsx'; | ||
|
||
function mapStateToProps(state) { | ||
const config = getConfig(state); | ||
|
||
return { | ||
diagnosticsEnabled: config.DiagnosticsEnabled === 'true', | ||
noAccounts: config.NoAccounts === 'true', | ||
}; | ||
} | ||
|
||
export default connect(mapStateToProps)(Root); |
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