File tree Expand file tree Collapse file tree 8 files changed +21
-27
lines changed
Expand file tree Collapse file tree 8 files changed +21
-27
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @inkeep/agents-manage-ui " : patch
3+ ---
4+
5+ fix double breadcrumbs on ` /projects ` error page
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import { BodyTemplate } from '@/components/layout/body-template' ;
2- import BaseSkeleton from '../(index)/loading ' ;
2+ import { Skeleton } from '@/components/ui/skeleton ' ;
33
44/**
55 * Base loading skeleton for this route segment.
@@ -11,7 +11,13 @@ import BaseSkeleton from '../(index)/loading';
1111export default function Loading ( ) {
1212 return (
1313 < BodyTemplate breadcrumbs = { [ ] } >
14- < BaseSkeleton />
14+ < Skeleton className = "h-7 mb-2" style = { { width : 70 } } />
15+ < Skeleton className = "h-5 mb-8" style = { { width : 420 } } />
16+ < div className = "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3 md:gap-4" >
17+ { Array . from ( { length : 6 } ) . map ( ( _ , i ) => (
18+ < Skeleton key = { i } className = "h-36 w-full rounded-lg" />
19+ ) ) }
20+ </ div >
1521 </ BodyTemplate >
1622 ) ;
1723}
Original file line number Diff line number Diff line change 1+ export { default } from './[projectId]/loading' ;
Original file line number Diff line number Diff line change 11import { Plus } from 'lucide-react' ;
22import FullPageError from '@/components/errors/full-page-error' ;
3+ import { BodyTemplate } from '@/components/layout/body-template' ;
34import EmptyState from '@/components/layout/empty-state' ;
45import { PageHeader } from '@/components/layout/page-header' ;
56import { NewProjectDialog } from '@/components/projects/new-project-dialog' ;
@@ -14,7 +15,7 @@ async function ProjectsPage({ params }: PageProps<'/[tenantId]/projects'>) {
1415
1516 try {
1617 const projects = await fetchProjects ( tenantId ) ;
17- return projects . data . length > 0 ? (
18+ const content = projects . data . length ? (
1819 < >
1920 < PageHeader
2021 title = "Projects"
@@ -44,6 +45,7 @@ async function ProjectsPage({ params }: PageProps<'/[tenantId]/projects'>) {
4445 }
4546 />
4647 ) ;
48+ return < BodyTemplate breadcrumbs = { [ ] } > { content } </ BodyTemplate > ;
4749 } catch ( error ) {
4850 return < FullPageError errorCode = { getErrorCode ( error ) } context = "projects" /> ;
4951 }
Original file line number Diff line number Diff line change 11import { BodyTemplate } from '@/components/layout/body-template' ;
22import { PageHeader } from '@/components/layout/page-header' ;
33
4- export default function Layout ( { children } : LayoutProps < '/[tenantId]/projects ' > ) {
4+ export default function Layout ( { children } : LayoutProps < '/[tenantId]/settings ' > ) {
55 return (
66 < BodyTemplate breadcrumbs = { [ 'Settings' ] } >
77 < PageHeader title = "Organization Settings" description = "Manage your organization settings" />
Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ export function Breadcrumbs({ items }: BreadcrumbsProps) {
5555 < ol className = "flex items-center gap-2" >
5656 { allItems . map ( ( label , idx , arr ) => {
5757 const isLast = idx === arr . length - 1 ;
58- const item : { label : string ; href ?: string } =
59- typeof label === 'string' ? { label } : label ;
58+ const item = typeof label === ' string' ? { label } : label ;
59+
6060 return (
6161 < li
6262 key = { `${ item . label } -${ idx } ` }
@@ -65,7 +65,7 @@ export function Breadcrumbs({ items }: BreadcrumbsProps) {
6565 ! isLast && 'after:content-["›"] after:text-muted-foreground/60'
6666 ) }
6767 >
68- { item . href && ! isLast ? (
68+ { ' href' in item && ! isLast ? (
6969 < Link href = { item . href } className = "hover:text-foreground" >
7070 { item . label }
7171 </ Link >
You can’t perform that action at this time.
0 commit comments