mirror of
https://github.com/wassname/talk.git
synced 2026-09-10 12:43:11 +08:00
Grabbing settings from the store
This commit is contained in:
@@ -190,7 +190,7 @@ class ModerationContainer extends Component {
|
||||
};
|
||||
|
||||
render () {
|
||||
const {root, root: {asset, settings}, data} = this.props;
|
||||
const {root, root: {asset}, data, settings} = this.props;
|
||||
const assetId = getAssetId(this.props);
|
||||
|
||||
if (data.error) {
|
||||
@@ -208,19 +208,17 @@ class ModerationContainer extends Component {
|
||||
// Still loading.
|
||||
return <Spinner />;
|
||||
}
|
||||
} else if(asset !== undefined || !('premodCount' in root)) {
|
||||
} else if (asset !== undefined || !('premodCount' in root)) {
|
||||
|
||||
// loading.
|
||||
return <Spinner />;
|
||||
}
|
||||
|
||||
const premodEnabled = assetId ? isPremod(asset.settings.moderation) : isPremod(settings.moderation);
|
||||
const premodEnabled = assetId ? isPremod(asset.settings.moderation) :
|
||||
isPremod(settings.moderation);
|
||||
|
||||
const currentQueueConfig = Object.assign({}, this.props.queueConfig);
|
||||
|
||||
console.log('premodEnabled', premodEnabled);
|
||||
console.log('root.premodCount', root.premodCount)
|
||||
|
||||
if (premodEnabled) {
|
||||
delete currentQueueConfig.new;
|
||||
} else if (root.premodCount === 0) {
|
||||
|
||||
Reference in New Issue
Block a user