File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -8,31 +8,23 @@ import { ContribPoint } from "../model/extension";
88const contribPoint : ContribPoint = "panels" ;
99
1010function PanelsControl ( ) {
11- const contributionModelsRecord = useAppStore (
12- ( state ) => state . contributionModelsRecord ,
13- ) ;
1411 const contributionStatesRecord = useAppStore (
1512 ( state ) => state . contributionStatesRecord ,
1613 ) ;
17- const panelModels = contributionModelsRecord [ contribPoint ] ;
1814 const panelStates = contributionStatesRecord [ contribPoint ] ;
19- if ( ! panelModels || ! panelStates ) {
15+ if ( ! panelStates ) {
2016 // Ok, not ready yet
2117 return null ;
2218 }
23- // TODO: assert panelModels.length === panelStates.length
24- if ( panelModels . length != panelStates ?. length ) {
25- throw Error ( "internal state error" ) ;
26- }
2719
2820 return (
29- < FormGroup >
21+ < FormGroup sx = { { display : "flex" , flexDirection : "row" } } >
3022 { panelStates . map ( ( panelState , panelIndex ) => {
3123 const id = `panels.${ panelIndex } ` ;
3224 return (
3325 < FormControlLabel
3426 key = { panelIndex }
35- label = { panelModels [ panelIndex ] . name }
27+ label = { panelState . title }
3628 control = {
3729 < Checkbox
3830 color = "secondary"
You can’t perform that action at this time.
0 commit comments