Skip to content

Commit

Permalink
support displaying error message in portal view
Browse files Browse the repository at this point in the history
  • Loading branch information
rahafjrw committed Dec 3, 2024
1 parent f06be9a commit 21631c0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Sources/App/Views/Manage/Portal+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@ import Foundation

enum Portal {

struct Model {
var errorMessage: String = ""
}

class View: PublicPage {

let model: Model

init(path: String, model: Model) {
self.model = model
super.init(path: path)
}

override func pageTitle() -> String? {
"Portal"
}
Expand All @@ -13,7 +24,8 @@ enum Portal {
.div(
.h2("Portal"),
.logoutButton(),
.deleteButton()
.deleteButton(),
.text(model.errorMessage)
)
}
}
Expand Down

0 comments on commit 21631c0

Please sign in to comment.