diff --git a/pages/welcome.go b/pages/welcome.go
index 88b1fc2..f60241c 100644
--- a/pages/welcome.go
+++ b/pages/welcome.go
@@ -1,12 +1,17 @@
package pages
import (
+ "fmt"
"github.com/gin-gonic/gin"
"net/http"
+ "sponsorahacker/utils"
)
func Welcome(c *gin.Context) {
+ isLoggedIn := utils.CheckIfLoggedIn(c)
+ fmt.Println("isLoggedIn:", isLoggedIn)
c.HTML(http.StatusOK, "welcome.html", gin.H{
- "title": "Sponsor A Hacker",
+ "title": "Sponsor A Hacker",
+ "isLoggedIn": isLoggedIn,
})
}
diff --git a/pages/wishlist.go b/pages/wishlist.go
index eb944af..ef54948 100644
--- a/pages/wishlist.go
+++ b/pages/wishlist.go
@@ -3,10 +3,14 @@ package pages
import (
"github.com/gin-gonic/gin"
"net/http"
+ "sponsorahacker/utils"
)
func Goals(c *gin.Context) {
+ isLoggedIn := utils.CheckIfLoggedIn(c)
+
c.HTML(http.StatusOK, "goals.html", gin.H{
- "title": "Sponsor A Hacker",
+ "title": "Sponsor A Hacker",
+ "isLoggedIn": isLoggedIn,
})
}
diff --git a/templates/goals.html b/templates/goals.html
index 6079765..d1ed32f 100644
--- a/templates/goals.html
+++ b/templates/goals.html
@@ -155,7 +155,7 @@
-{{template "pageheader"}}
+{{template "pageheader" . }}