mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
pass ctx props
This commit is contained in:
parent
a3995eb988
commit
3a229d2874
@ -10,8 +10,6 @@ import { Icons, createIconRender } from "components/Icons"
|
|||||||
import SettingsList from "schemas/settings"
|
import SettingsList from "schemas/settings"
|
||||||
import groupsDecorator from "schemas/settingsGroupsDecorator.json"
|
import groupsDecorator from "schemas/settingsGroupsDecorator.json"
|
||||||
|
|
||||||
import { AboutApp } from ".."
|
|
||||||
|
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
|
|
||||||
const ItemTypes = {
|
const ItemTypes = {
|
||||||
@ -269,7 +267,13 @@ const SettingItem = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="component">
|
<div className="component">
|
||||||
<div>
|
<div>
|
||||||
{loading ? <div> Loading... </div> : React.createElement(SettingComponent, item.props)}
|
{loading ? <div> Loading... </div> : React.createElement(SettingComponent, {
|
||||||
|
...item.props,
|
||||||
|
ctx: {
|
||||||
|
dispatchUpdate,
|
||||||
|
onUpdateItem,
|
||||||
|
}
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{delayedValue && <div>
|
{delayedValue && <div>
|
||||||
@ -381,7 +385,7 @@ export default class SettingsMenu extends React.PureComponent {
|
|||||||
|
|
||||||
onClickAppAbout = () => {
|
onClickAppAbout = () => {
|
||||||
window.app.setLocation("/about")
|
window.app.setLocation("/about")
|
||||||
|
|
||||||
if (typeof this.props.close === "function") {
|
if (typeof this.props.close === "function") {
|
||||||
this.props.close()
|
this.props.close()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user