diff --git a/apps/app/src/components/Sidebar.tsx b/apps/app/src/components/Sidebar.tsx index 1066ce5..d4a33ff 100644 --- a/apps/app/src/components/Sidebar.tsx +++ b/apps/app/src/components/Sidebar.tsx @@ -1,17 +1,25 @@ -import { FileStackIcon } from 'lucide-react' +import { ChevronRightIcon, FileStackIcon } from 'lucide-react' import { Collapsible, + CollapsibleContent, + CollapsibleTrigger, Sidebar as SidebarComp, SidebarContent, SidebarFooter, SidebarGroup, SidebarHeader, SidebarMenu, + SidebarMenuAction, + SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, } from '@boring.tools/ui' import { Link } from '@tanstack/react-router' +import { useChangelogList } from '../hooks/useChangelog' import { SidebarUser } from './SidebarUser' const items = [ @@ -24,6 +32,7 @@ const items = [ ] export function Sidebar() { + const { data, error } = useChangelogList() return ( @@ -49,34 +58,40 @@ export function Sidebar() { - + {item.title} - {/* {item.items?.length ? ( - <> - - - - Toggle - - - - - {item.items?.map((subItem) => ( - - - - {subItem.title} - - - - ))} - - - - ) : null} */} + + + + + Toggle + + + + + {!error && + data?.map((changelog) => ( + + + + {changelog.title} + + + + ))} + + ))} diff --git a/apps/app/src/hooks/useChangelog.ts b/apps/app/src/hooks/useChangelog.ts index dc47add..d2a8bee 100644 --- a/apps/app/src/hooks/useChangelog.ts +++ b/apps/app/src/hooks/useChangelog.ts @@ -88,6 +88,9 @@ export const useChangelogUpdate = () => { queryClient.invalidateQueries({ queryKey: ['changelogById', data.id], }) + queryClient.invalidateQueries({ + queryKey: ['changelogList'], + }) }, }) } diff --git a/apps/app/src/routes/__root.tsx b/apps/app/src/routes/__root.tsx index b5f4551..62c4a5f 100644 --- a/apps/app/src/routes/__root.tsx +++ b/apps/app/src/routes/__root.tsx @@ -14,7 +14,9 @@ export const Route = createRootRoute({ - {!import.meta.env.PROD && } + {!import.meta.env.PROD && ( + + )} diff --git a/apps/app/tailwind.config.js b/apps/app/tailwind.config.js index 5cff6b1..3473ca3 100644 --- a/apps/app/tailwind.config.js +++ b/apps/app/tailwind.config.js @@ -51,6 +51,16 @@ export default { DEFAULT: 'hsl(var(--card))', foreground: 'hsl(var(--card-foreground))', }, + sidebar: { + DEFAULT: 'hsl(var(--sidebar-background))', + foreground: 'hsl(var(--sidebar-foreground))', + primary: 'hsl(var(--sidebar-primary))', + 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))', + accent: 'hsl(var(--sidebar-accent))', + 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))', + border: 'hsl(var(--sidebar-border))', + ring: 'hsl(var(--sidebar-ring))', + }, }, borderRadius: { lg: 'var(--radius)',