"chats" menu open by default

master
Avraham Sakal 3 months ago
parent 01d2997f77
commit d7716bd451

@ -54,7 +54,7 @@ export default function LayoutDefault({
// } // }
// }, [isConversationListExpanded]); // }, [isConversationListExpanded]);
function handleDeleteConversation(conversationId: ConversationsId) { function handleDeleteConversation(conversationId: string) {
removeConversation(conversationId); removeConversation(conversationId);
trpc.chat.deleteConversation.mutate({ id: conversationId }); trpc.chat.deleteConversation.mutate({ id: conversationId });
} }
@ -95,10 +95,9 @@ export default function LayoutDefault({
<NavLink <NavLink
key="chat-new" key="chat-new"
href="#required-for-focus-management" href="#required-for-focus-management"
label="Chats" label={
leftSection={<IconActivity size={16} stroke={1.5} />} <Group justify="space-between">
rightSection={ <span>Chats</span>
<>
<IconPlus <IconPlus
size={16} size={16}
stroke={1.5} stroke={1.5}
@ -113,15 +112,19 @@ export default function LayoutDefault({
}); });
}} }}
/> />
</Group>
}
leftSection={<IconActivity size={16} stroke={1.5} />}
rightSection={
<IconChevronRight <IconChevronRight
size={12} size={12}
stroke={1.5} stroke={1.5}
className="mantine-rotate-rtl" className="mantine-rotate-rtl"
/> />
</>
} }
variant="subtle" variant="subtle"
active={urlPathname.startsWith("/chat")} active={urlPathname.startsWith("/chat")}
defaultOpened={true}
> >
{conversations.map((conversation) => ( {conversations.map((conversation) => (
<NavLink <NavLink

Loading…
Cancel
Save