2024-06-27 21:23:51 -06:00
|
|
|
package pages
|
|
|
|
|
|
|
|
import (
|
|
|
|
"pollo/lib"
|
|
|
|
|
|
|
|
"github.com/labstack/echo/v4"
|
|
|
|
)
|
|
|
|
|
|
|
|
type DashboardProps struct {
|
2024-06-27 21:51:00 -06:00
|
|
|
IsLoggedIn bool
|
2024-06-27 21:23:51 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
func Dashboard(c echo.Context) error {
|
2024-06-27 21:51:00 -06:00
|
|
|
props := DashboardProps{
|
|
|
|
IsLoggedIn: lib.IsSignedIn(c),
|
|
|
|
}
|
2024-06-27 21:23:51 -06:00
|
|
|
|
|
|
|
// Specify the partials used by this page
|
|
|
|
partials := []string{"header"}
|
|
|
|
|
|
|
|
// Render the template
|
|
|
|
return lib.RenderTemplate(c.Response().Writer, "base", partials, props)
|
|
|
|
}
|