mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-16 05:23:19 +01:00
fix JSX eslint problems
This commit is contained in:
parent
bec2aecfda
commit
9d9e79f814
9 changed files with 10 additions and 25 deletions
|
|
@ -17,11 +17,8 @@ function RenderObjectImpl({object, inner}) {
|
|||
</div>;
|
||||
} else if (Array.isArray(object)) {
|
||||
return <div style={{marginLeft: inner?10:0}}>
|
||||
{Object.map(object).map((item, i) => <div key={i}>
|
||||
<div><RenderObject object={object[field]} inner/></div>
|
||||
</div>)}
|
||||
{Object.keys(object).map(field => <div key={field}>
|
||||
{field}: <RenderObject object={object[field]} inner/>
|
||||
{object.map((item, i) => <div key={i}>
|
||||
<div><RenderObject object={object[item]} inner/></div>
|
||||
</div>)}
|
||||
</div>;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
import React from 'react';
|
||||
|
||||
|
||||
|
||||
export function Toaster({}) {
|
||||
|
||||
return <div>
|
||||
|
||||
</div>;
|
||||
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@ import decoratorChain from 'ui/decoratorChain';
|
|||
import {MOpenFaceShell} from "cad/model/mopenFace";
|
||||
|
||||
export default connect(streams => streams.craft.models.map(models => ({models})))
|
||||
(function ObjectExplorer({models}) {
|
||||
(function ObjectExplorer({models}) { // eslint-disable-line no-unexpected-multiline
|
||||
|
||||
return <div> {models.map(m => {
|
||||
if (m instanceof MOpenFaceShell) {
|
||||
|
|
@ -69,7 +69,7 @@ const ModelSection = decoratorChain(
|
|||
select: () => ctx.services.pickControl.pick(props.model)
|
||||
})),
|
||||
connect((streams, props) => (streams.selection[props.type] || constant([])).map(selection => ({selection}))))
|
||||
(
|
||||
( // eslint-disable-line no-unexpected-multiline
|
||||
function ModelSection({model, type, typeLabel, selection, select, ...props}) {
|
||||
let labelClasses = cx(ls.modelLabel, {
|
||||
[ls.selected]: selection.indexOf(model.id) !== -1
|
||||
|
|
|
|||
|
|
@ -23,6 +23,5 @@ export default connect(streams =>
|
|||
streams.action.hint,
|
||||
streams.ui.keymap)
|
||||
.map(([hintInfo, keymap]) => Object.assign({hotKey: hintInfo && keymap[hintInfo.actionId]}, hintInfo)
|
||||
))
|
||||
(ActionInfo);
|
||||
))(ActionInfo);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import Card from "ui/components/Card";
|
|||
import {useStreamWithUpdater} from "ui/effects";
|
||||
import {ReactApplicationContext} from "../ReactApplicationContext";
|
||||
|
||||
export default function AppTabs({}) {
|
||||
export default function AppTabs() {
|
||||
|
||||
const [{tabs, activeTab}, updateTabs] = useStreamWithUpdater(ctx => ctx.appTabsService.tabs$);
|
||||
const ctx = useContext(ReactApplicationContext);
|
||||
|
|
|
|||
|
|
@ -26,4 +26,4 @@ export default class Socket extends React.Component {
|
|||
}
|
||||
return <Component {...props} />;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -60,8 +60,7 @@ const ConnectedActionMenu = connect((streams, props) =>
|
|||
combine(
|
||||
streams.ui.menu.states[props.menuId],
|
||||
streams.ui.keymap)
|
||||
.map(([s, keymap]) => ({...s, keymap})))
|
||||
(ActionMenu);
|
||||
.map(([s, keymap]) => ({...s, keymap})))(ActionMenu);
|
||||
|
||||
export function ConnectedMenuItem(props) {
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import {SketcherAppContext} from "./SketcherAppContext";
|
|||
import {TextField} from "cad/craft/wizard/components/form/Fields";
|
||||
|
||||
|
||||
export default function SketcherOperationWizard({}) {
|
||||
export default function SketcherOperationWizard() {
|
||||
|
||||
const [state, setState] = useState(null);
|
||||
|
||||
|
|
|
|||
|
|
@ -172,6 +172,7 @@ const DEFAULT_COMMAND_HANDLER = (command, println, ctx) => {
|
|||
const output = eval(command);
|
||||
println({text: output});
|
||||
} catch (e) {
|
||||
//ignore
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue