Skip to content

Commit 21631c0

Browse files
committed
support displaying error message in portal view
1 parent f06be9a commit 21631c0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Sources/App/Views/Manage/Portal+View.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,19 @@ import Foundation
33

44
enum Portal {
55

6+
struct Model {
7+
var errorMessage: String = ""
8+
}
9+
610
class View: PublicPage {
711

12+
let model: Model
13+
14+
init(path: String, model: Model) {
15+
self.model = model
16+
super.init(path: path)
17+
}
18+
819
override func pageTitle() -> String? {
920
"Portal"
1021
}
@@ -13,7 +24,8 @@ enum Portal {
1324
.div(
1425
.h2("Portal"),
1526
.logoutButton(),
16-
.deleteButton()
27+
.deleteButton(),
28+
.text(model.errorMessage)
1729
)
1830
}
1931
}

0 commit comments

Comments
 (0)