mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 17:30:16 +01:00
🐛 fix: Resolve 'Icon is Not a Function' Error in PresetItems (#5260)
* refactor: improve typing * fix: "TypeError: Icon is not a function" with proper use of Functional Component and Improved Typing
This commit is contained in:
parent
0855677a36
commit
24beda3d69
6 changed files with 57 additions and 49 deletions
|
|
@ -20,8 +20,6 @@ const PresetsMenu: FC = () => {
|
|||
exportPreset,
|
||||
} = usePresets();
|
||||
const { preset } = useChatContext();
|
||||
|
||||
const presets = presetsQuery.data || [];
|
||||
return (
|
||||
<Root>
|
||||
<Trigger asChild>
|
||||
|
|
@ -54,7 +52,7 @@ const PresetsMenu: FC = () => {
|
|||
className="mt-2 max-h-[495px] overflow-x-hidden rounded-lg border border-gray-200 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-700 dark:text-white md:min-w-[400px]"
|
||||
>
|
||||
<PresetItems
|
||||
presets={presets}
|
||||
presets={presetsQuery.data}
|
||||
onSetDefaultPreset={onSetDefaultPreset}
|
||||
onSelectPreset={onSelectPreset}
|
||||
onChangePreset={onChangePreset}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue