feat: integrate Radix UI scroll area component and update message list view

This commit is contained in:
Wang Chenxi
2025-04-17 20:36:11 +08:00
parent 211c4af256
commit b06a4a625b
5 changed files with 3621 additions and 2964 deletions

View File

@@ -3,6 +3,7 @@
import { useStickToBottom } from "use-stick-to-bottom";
import { ScrollArea } from "~/components/ui/scroll-area";
import { cn } from "~/lib/utils";
export function ScrollContainer({
@@ -47,11 +48,11 @@ export function ScrollContainer({
></div>
</>
)}
<div ref={scrollRef} className={"h-full w-full overflow-y-scroll"}>
<ScrollArea ref={scrollRef} className="h-full w-full">
<div className="h-fit w-full" ref={contentRef}>
{children}
</div>
</div>
</ScrollArea>
</div>
);
}