mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 09:20:15 +01:00
⚡️ refactor: Optimize Rendering Performance for Icons, Conversations (#5234)
* refactor: HoverButtons and Fork components to use explicit props * refactor: improve typing for Fork Component * fix: memoize SpecIcon to avoid unnecessary re-renders * feat: introduce URLIcon component and update SpecIcon for improved icon handling * WIP: optimizing icons * refactor: simplify modelLabel assignment in Message components * refactor: memoize ConvoOptions component to optimize rendering performance
This commit is contained in:
parent
687ab32bd3
commit
0f95604a67
19 changed files with 206 additions and 171 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { useState, useId, useRef } from 'react';
|
||||
import { useState, useId, useRef, memo } from 'react';
|
||||
import * as Menu from '@ariakit/react/menu';
|
||||
import { Ellipsis, Share2, Copy, Archive, Pen, Trash } from 'lucide-react';
|
||||
import { useGetStartupConfig } from 'librechat-data-provider/react-query';
|
||||
|
|
@ -12,7 +12,7 @@ import DeleteButton from './DeleteButton';
|
|||
import ShareButton from './ShareButton';
|
||||
import { cn } from '~/utils';
|
||||
|
||||
export default function ConvoOptions({
|
||||
function ConvoOptions({
|
||||
conversationId,
|
||||
title,
|
||||
retainView,
|
||||
|
|
@ -161,3 +161,5 @@ export default function ConvoOptions({
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(ConvoOptions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue