Feat: components chain
This commit is contained in:
		| @@ -2,6 +2,7 @@ package handlers | ||||
|  | ||||
| import ( | ||||
| 	"golias/config" | ||||
| 	"golias/models" | ||||
| 	"golias/pkg/cache" | ||||
| 	"html/template" | ||||
| 	"log/slog" | ||||
| @@ -43,6 +44,14 @@ func HandleHome(w http.ResponseWriter, r *http.Request) { | ||||
| 		return | ||||
| 	} | ||||
| 	// check if user in a room | ||||
| 	roomID := getRoomIDFromCtx(r.Context()) | ||||
| 	tmpl.ExecuteTemplate(w, "main", roundWords) | ||||
| 	// roomID := getRoomIDFromCtx(r.Context()) | ||||
| 	// roomID = "test-id" | ||||
| 	// if roomID != "" { | ||||
| 	// 	// get room data | ||||
| 	// 	userState := models.MakeTestState() | ||||
| 	// 	tmpl.ExecuteTemplate(w, "room", userState) | ||||
| 	// 	return | ||||
| 	// } | ||||
| 	userState := models.MakeTestState() | ||||
| 	tmpl.ExecuteTemplate(w, "main", userState) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder