Use ifView instead of mapView

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-07-15 23:22:33 +05:30
parent 694b627309
commit 4946683b23

View file

@ -11,7 +11,7 @@ export class RightPanelView extends TemplateView {
};
return t.div({ className: "RightPanelView" },
[
t.mapView(vm => vm.activeViewModel && vm, vm => vm ? new ButtonsView(vm) : null),
t.ifView(vm => vm.activeViewModel, vm => new ButtonsView(vm)),
t.mapView(vm => vm.activeViewModel, vm => vm ? new viewFromType[vm.type](vm) : new LoadingView())
]
);