feat: redesign navs

This commit is contained in:
2026-03-16 22:28:30 +01:00
parent 5bce586db6
commit 96cb3701ba
18 changed files with 501 additions and 432 deletions

View File

@@ -38,7 +38,6 @@ export function KosmosSidebar() {
const navigate = useNavigate()
const location = useLocation()
const { recollectionId: selectedRecollectionId } = useParams<{ recollectionId: string }>()
const handleSelectRecollection = useCallback((id: string) => navigate(`/recollections/${id}`), [navigate])
const handleCreateRecollection = useCallback(
(recollection: Parameters<typeof createRecollection>[0]) => {
@@ -149,13 +148,11 @@ export function KosmosSidebar() {
const isActive = selectedRecollectionId === recollection.id
return (
<SidebarMenuItem key={recollection.id}>
<SidebarMenuButton
tooltip={recollection.name}
isActive={isActive}
onClick={() => handleSelectRecollection(recollection.id)}
>
<Icon className="size-4" />
<span>{recollection.name}</span>
<SidebarMenuButton asChild tooltip={recollection.name} isActive={isActive}>
<Link to={`/recollections/${recollection.id}`}>
<Icon className="size-4" />
<span>{recollection.name}</span>
</Link>
</SidebarMenuButton>
</SidebarMenuItem>
)