forked from mystiq/hydrogen-web
replace custom error view with staticview
This commit is contained in:
parent
fa8bec0b56
commit
de83d7740b
1 changed files with 6 additions and 10 deletions
|
@ -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),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue