From a120c37a46c575cc5fffae0ecf96be9677344a32 Mon Sep 17 00:00:00 2001 From: Prad N Date: Fri, 30 May 2025 17:27:46 -0400 Subject: [PATCH] refactor: move view rendering to handlers for better separation of concerns --- config/routes.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/config/routes.go b/config/routes.go index 490e035..526cd79 100644 --- a/config/routes.go +++ b/config/routes.go @@ -6,10 +6,6 @@ package config import ( "github.com/labstack/echo/v4" "github.com/sonr-io/motr/handlers" - "github.com/sonr-io/motr/internal/ui/home" - "github.com/sonr-io/motr/internal/ui/login" - "github.com/sonr-io/motr/internal/ui/register" - "github.com/sonr-io/motr/pkg/render" ) // ╭────────────────────────────────────────────────╮ @@ -17,9 +13,9 @@ import ( // ╰────────────────────────────────────────────────╯ func RegisterViews(e *echo.Echo) { - e.GET("/", render.Page(home.HomeView())) - e.GET("/login", render.Page(login.LoginView())) - e.GET("/register", render.Page(register.RegisterView())) + e.GET("/", handlers.RenderHomePage) + e.GET("/login", handlers.RenderLoginPage) + e.GET("/register", handlers.RenderRegisterPage) } func RegisterPartials(e *echo.Echo) {