Added page protection for unauthorized access
This commit is contained in:
13
view/page/profile.templ
Normal file
13
view/page/profile.templ
Normal file
@@ -0,0 +1,13 @@
|
||||
package page
|
||||
|
||||
import "projectreshoot/view/layout"
|
||||
import "projectreshoot/contexts"
|
||||
|
||||
templ Profile() {
|
||||
{{ user := contexts.GetUser(ctx) }}
|
||||
@layout.Global() {
|
||||
<div class="">
|
||||
Hello, { user.Username }
|
||||
</div>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user