SurfSense/surfsense_web/app/dashboard/[search_space_id]/layout.tsx
Anish Sarkar 5f76844992 refactor: update dashboard layout and enhance Circleback connector configuration
- Modified the DashboardLayout to replace the "Sources" section with a "Documents" entry, improving navigation clarity.
- Updated the CirclebackConfig component to include an Info icon for configuration instructions and adjusted the webhook URL input to be disabled for better user experience.
- Enhanced the useConnectorDialog hook to handle non-indexable connectors more effectively, ensuring proper state management and user feedback.
- Improved icon mapping in the app sidebar for consistency across components.
2026-01-01 22:08:20 +05:30

59 lines
1.1 KiB
TypeScript

// Server component
import type React from "react";
import { use } from "react";
import { DashboardClientLayout } from "./client-layout";
export default function DashboardLayout({
params,
children,
}: {
params: Promise<{ search_space_id: string }>;
children: React.ReactNode;
}) {
// Use React.use to unwrap the params Promise
const { search_space_id } = use(params);
const customNavSecondary = [
{
title: `All Search Spaces`,
url: `#`,
icon: "Info",
},
{
title: `All Search Spaces`,
url: "/dashboard",
icon: "Undo2",
},
];
const customNavMain = [
{
title: "Chat",
url: `/dashboard/${search_space_id}/new-chat`,
icon: "MessageCircle",
items: [],
},
{
title: "Documents",
url: `/dashboard/${search_space_id}/documents`,
icon: "SquareLibrary",
items: [],
},
{
title: "Logs",
url: `/dashboard/${search_space_id}/logs`,
icon: "Logs",
items: [],
},
];
return (
<DashboardClientLayout
searchSpaceId={search_space_id}
navSecondary={customNavSecondary}
navMain={customNavMain}
>
{children}
</DashboardClientLayout>
);
}