Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages-answers/ui/src/ChatDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
export default function ChatDrawer({ journeys: _journeys, chats: _chats, defaultOpen }: ChatDrawerProps) {
const _router = useRouter()
const pathname = usePathname()
const [_open, setOpen] = React.useState<boolean | undefined>(defaultOpen)

Check warning on line 60 in packages-answers/ui/src/ChatDrawer.tsx

View workflow job for this annotation

GitHub Actions / build

'setOpen' is assigned a value but never used. Allowed unused vars must match /^_/u
const [_opened, setOpened] = React.useState<{ [key: string | number]: boolean }>({ chats: true })

Check warning on line 61 in packages-answers/ui/src/ChatDrawer.tsx

View workflow job for this annotation

GitHub Actions / build

'setOpened' is assigned a value but never used. Allowed unused vars must match /^_/u
const loadMoreRef = React.useRef<HTMLDivElement>(null)

const getKey = (pageIndex: number, previousPageData: Chat[] | null) => {
Expand Down Expand Up @@ -154,7 +154,16 @@
<ListItemButton selected={pathname === `/chat/${chat.id}`} href={`/chat/${chat.id}`} component={NextLink}>
<ListItemText
secondary={chat.title}
sx={pathname === `/chat/${chat.id}` ? { '.MuiListItemText-secondary': { color: 'white' } } : {}}
sx={{
overflow: 'hidden',
'.MuiListItemText-secondary': {
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
display: 'block',
...(pathname === `/chat/${chat.id}` ? { color: 'white' } : {})
}
}}
/>
</ListItemButton>
</ListItem>
Expand Down
Loading