feat: properly set space card url

This commit is contained in:
juancwu 2026-04-11 21:49:16 +00:00
commit 0f9c122608

View file

@ -4,6 +4,7 @@ import "github.com/shopspring/decimal"
import "strings" import "strings"
import "git.juancwu.dev/juancwu/budgit/internal/ui/components/icon" import "git.juancwu.dev/juancwu/budgit/internal/ui/components/icon"
import "fmt" import "fmt"
import "git.juancwu.dev/juancwu/budgit/internal/routeurl"
type SpaceCardInfo struct { type SpaceCardInfo struct {
ID string ID string
@ -13,7 +14,7 @@ type SpaceCardInfo struct {
} }
templ SpaceCard(info SpaceCardInfo) { templ SpaceCard(info SpaceCardInfo) {
<a href="#" class="px-2 py-2 block rounded-md hover:bg-sidebar-accent"> <a href={ routeurl.URL("page.app.spaces.space.overview", "spaceID", info.ID) } class="px-2 py-2 block rounded-md hover:bg-sidebar-accent">
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<div class="flex gap-4 items-center"> <div class="flex gap-4 items-center">
<div class="w-10 h-10 shrink-0 overflow-hidden rounded-md bg-muted flex items-center justify-center"> <div class="w-10 h-10 shrink-0 overflow-hidden rounded-md bg-muted flex items-center justify-center">