chore: ran frontend linting

This commit is contained in:
Anish Sarkar 2026-01-27 16:34:35 +05:30
parent b148731fda
commit 3604a0bbf3
2 changed files with 16 additions and 18 deletions

View file

@ -171,7 +171,9 @@ export function Sidebar({
> >
{sharedChats.length > 0 ? ( {sharedChats.length > 0 ? (
<div className="relative flex-1 min-h-0"> <div className="relative flex-1 min-h-0">
<div className={`flex flex-col gap-0.5 h-full overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent ${sharedChats.length > 4 ? 'pb-8' : ''}`}> <div
className={`flex flex-col gap-0.5 h-full overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent ${sharedChats.length > 4 ? "pb-8" : ""}`}
>
{sharedChats.slice(0, 20).map((chat) => ( {sharedChats.slice(0, 20).map((chat) => (
<ChatListItem <ChatListItem
key={chat.id} key={chat.id}
@ -221,7 +223,9 @@ export function Sidebar({
> >
{chats.length > 0 ? ( {chats.length > 0 ? (
<div className="relative flex-1 min-h-0"> <div className="relative flex-1 min-h-0">
<div className={`flex flex-col gap-0.5 h-full overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent ${chats.length > 4 ? 'pb-8' : ''}`}> <div
className={`flex flex-col gap-0.5 h-full overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent ${chats.length > 4 ? "pb-8" : ""}`}
>
{chats.slice(0, 20).map((chat) => ( {chats.slice(0, 20).map((chat) => (
<ChatListItem <ChatListItem
key={chat.id} key={chat.id}

View file

@ -27,14 +27,10 @@ export function SidebarSection({
const [isOpen, setIsOpen] = useState(defaultOpen); const [isOpen, setIsOpen] = useState(defaultOpen);
return ( return (
<Collapsible <Collapsible
open={isOpen} open={isOpen}
onOpenChange={setIsOpen} onOpenChange={setIsOpen}
className={cn( className={cn("overflow-hidden", fillHeight && "flex flex-col flex-1 min-h-0", className)}
"overflow-hidden",
fillHeight && "flex flex-col flex-1 min-h-0",
className
)}
> >
<div className="flex items-center group/section shrink-0"> <div className="flex items-center group/section shrink-0">
<CollapsibleTrigger className="flex flex-1 items-center gap-1.5 px-2 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors min-w-0"> <CollapsibleTrigger className="flex flex-1 items-center gap-1.5 px-2 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors min-w-0">
@ -60,14 +56,12 @@ export function SidebarSection({
)} )}
</div> </div>
<CollapsibleContent className={cn( <CollapsibleContent
"overflow-hidden", className={cn("overflow-hidden", fillHeight && "flex-1 flex flex-col min-h-0")}
fillHeight && "flex-1 flex flex-col min-h-0" >
)}> <div
<div className={cn( className={cn("px-2 pb-2", fillHeight && "flex-1 flex flex-col min-h-0 overflow-hidden")}
"px-2 pb-2", >
fillHeight && "flex-1 flex flex-col min-h-0 overflow-hidden"
)}>
{children} {children}
</div> </div>
</CollapsibleContent> </CollapsibleContent>