mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-04 21:32:39 +02:00
refactor: enhance Circleback connector configuration and simplify sidebar components
- Introduced Zod schema for type-safe validation of Circleback webhook info, improving data handling in the CirclebackConfig component. - Updated the CirclebackConfig to utilize the new schema for fetching and setting webhook information. - Removed unnecessary state management related to source expansion in the sidebar components, streamlining the NavMain, NavChats, and NavNotes components. - Improved overall code clarity and maintainability by eliminating unused imports and props.
This commit is contained in:
parent
5f76844992
commit
f9a10c1e0d
5 changed files with 37 additions and 45 deletions
|
|
@ -295,7 +295,6 @@ export const AppSidebar = memo(function AppSidebar({
|
|||
const { theme, setTheme } = useTheme();
|
||||
const { data: user, isPending: isLoadingUser } = useAtomValue(currentUserAtom);
|
||||
const [isClient, setIsClient] = useState(false);
|
||||
const [isSourcesExpanded, setIsSourcesExpanded] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsClient(true);
|
||||
|
|
@ -447,19 +446,17 @@ export const AppSidebar = memo(function AppSidebar({
|
|||
</SidebarHeader>
|
||||
|
||||
<SidebarContent className="gap-1">
|
||||
<NavMain items={processedNavMain} onSourcesExpandedChange={setIsSourcesExpanded} />
|
||||
<NavMain items={processedNavMain} />
|
||||
|
||||
<NavChats
|
||||
chats={processedRecentChats}
|
||||
searchSpaceId={searchSpaceId}
|
||||
isSourcesExpanded={isSourcesExpanded}
|
||||
/>
|
||||
|
||||
<NavNotes
|
||||
notes={processedRecentNotes}
|
||||
onAddNote={onAddNote}
|
||||
searchSpaceId={searchSpaceId}
|
||||
isSourcesExpanded={isSourcesExpanded}
|
||||
/>
|
||||
</SidebarContent>
|
||||
<SidebarFooter>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue