From de83d7740b4a94988eac98cb6433cdb1571cd8f4 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 14 Oct 2020 11:26:39 +0200 Subject: [PATCH] replace custom error view with staticview --- src/ui/web/RootView.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/ui/web/RootView.js b/src/ui/web/RootView.js index 34ea1b2c..f60bb984 100644 --- a/src/ui/web/RootView.js +++ b/src/ui/web/RootView.js @@ -26,7 +26,12 @@ export class RootView extends TemplateView { return t.mapView(vm => vm.activeSection, activeSection => { switch (activeSection) { case "error": - return new StatusView({header: "Something went wrong", message: vm.errorText}); + return new StaticView(t => { + return t.div({className: "StatusView"}, [ + t.h1("Something went wrong"), + t.p(vm.errorText), + ]) + }); case "session": return new SessionView(vm.sessionViewModel); case "login": @@ -43,12 +48,3 @@ export class RootView extends TemplateView { }); } } - -class StatusView extends TemplateView { - render(t, vm) { - return t.div({className: "StatusView"}, [ - t.h1(vm.header), - t.p(vm.message), - ]); - } -}