mirror of
https://github.com/wassname/talk.git
synced 2026-08-05 13:30:26 +08:00
using the plugins service
This commit is contained in:
@@ -465,9 +465,6 @@ const mapStateToProps = state => ({
|
||||
activeStreamTab: state.stream.activeTab,
|
||||
previousStreamTab: state.stream.previousTab,
|
||||
commentClassNames: state.stream.commentClassNames,
|
||||
|
||||
// @Deprecated plugin_config
|
||||
pluginsConfig: state.config.plugins_config || state.config.plugin_config,
|
||||
sortOrder: state.stream.sortOrder,
|
||||
sortBy: state.stream.sortBy,
|
||||
});
|
||||
|
||||
@@ -93,12 +93,6 @@ class Slot extends React.Component {
|
||||
children = children.map(childFactory);
|
||||
}
|
||||
|
||||
const debugProps = pluginsConfig.debug
|
||||
? {
|
||||
'data-slot-name': fill,
|
||||
}
|
||||
: {};
|
||||
|
||||
return (
|
||||
<Component
|
||||
className={cn(
|
||||
@@ -109,7 +103,6 @@ class Slot extends React.Component {
|
||||
className,
|
||||
`talk-slot-${kebabCase(fill)}`
|
||||
)}
|
||||
{...debugProps}
|
||||
>
|
||||
{children}
|
||||
</Component>
|
||||
|
||||
@@ -102,8 +102,16 @@ class PluginsService {
|
||||
get(reduxState, 'config.plugins_config') ||
|
||||
get(reduxState, 'config.plugin_config') ||
|
||||
emptyConfig;
|
||||
|
||||
const debugProps = pluginsConfig.debug
|
||||
? {
|
||||
'data-slot-name': props.fill,
|
||||
}
|
||||
: {};
|
||||
|
||||
return {
|
||||
...props,
|
||||
...debugProps,
|
||||
config: pluginsConfig,
|
||||
...(component.fragments
|
||||
? pick(queryData, Object.keys(component.fragments))
|
||||
|
||||
Reference in New Issue
Block a user