SarahXia0405 commited on
Commit
5b25a69
·
verified ·
1 Parent(s): 9c75094

Update web/src/components/sidebar/SavedChatSection.tsx

Browse files
web/src/components/sidebar/SavedChatSection.tsx CHANGED
@@ -21,20 +21,20 @@ export function SavedChatSection({
21
  if (!isLoggedIn) return null;
22
 
23
  return (
24
- // ✅ Eat remaining height in LeftSidebar
25
- <div className="flex-1 min-h-0 flex flex-col overflow-hidden">
26
- {/* fixed header */}
27
- <div className="px-4 py-3 flex-shrink-0">
28
  <div className="flex items-center gap-2">
29
  <Bookmark className="h-4 w-4" />
30
  <div className="font-semibold">Saved Chat</div>
31
  </div>
32
  </div>
33
 
34
- <Separator className="flex-shrink-0" />
35
 
36
- {/* ONLY THIS SCROLLS */}
37
- <div className="flex-1 min-h-0 overflow-y-auto px-4 py-4">
38
  {savedChats.length === 0 ? (
39
  <Card className="p-8 text-center">
40
  <div className="text-sm text-muted-foreground">No saved chats yet</div>
 
21
  if (!isLoggedIn) return null;
22
 
23
  return (
24
+ // ✅ NO scrolling here. Scrolling is owned by LeftSidebar's scroll container.
25
+ <div className="w-full">
26
+ {/* header (stays at top of scroll content; LeftSidebar decides if it should be sticky/fixed) */}
27
+ <div className="px-4 py-3">
28
  <div className="flex items-center gap-2">
29
  <Bookmark className="h-4 w-4" />
30
  <div className="font-semibold">Saved Chat</div>
31
  </div>
32
  </div>
33
 
34
+ <Separator />
35
 
36
+ {/* content (normal flow; NO overflow-y-auto) */}
37
+ <div className="px-4 py-4">
38
  {savedChats.length === 0 ? (
39
  <Card className="p-8 text-center">
40
  <div className="text-sm text-muted-foreground">No saved chats yet</div>