fix: strict typescript issue, plugins localStorage, both causing App Errors (#765)

* fix(Enum): cannot be used as a value when imported as type

* hotfix(types): corrected types, some causing application error (bing null model)

* hotfix(Plugins): fix undefined localStorage item causing Application error
This commit is contained in:
Danny Avila 2023-08-06 11:26:37 -04:00 committed by GitHub
parent 06a7fba39b
commit 92f87b8dcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 6 deletions

View file

@ -3,7 +3,7 @@ import { useEffect } from 'react';
import filenamify from 'filenamify';
import exportFromJSON from 'export-from-json';
import { useSetRecoilState, useRecoilState, useRecoilValue } from 'recoil';
import { EditPresetProps } from 'librechat-data-provider';
import { TEditPresetProps } from '~/common';
import { useSetOptions, useLocalize } from '~/hooks';
import { Input, Label, Dropdown, Dialog, DialogClose, DialogButton } from '~/components/';
import DialogTemplate from '~/components/ui/DialogTemplate';
@ -12,7 +12,7 @@ import EndpointSettings from './EndpointSettings';
import { cn, defaultTextProps, removeFocusOutlines, cleanupPreset } from '~/utils/';
import store from '~/store';
const EditPresetDialog = ({ open, onOpenChange, preset: _preset, title }: EditPresetProps) => {
const EditPresetDialog = ({ open, onOpenChange, preset: _preset, title }: TEditPresetProps) => {
const [preset, setPreset] = useRecoilState(store.preset);
const setPresets = useSetRecoilState(store.presets);
const availableEndpoints = useRecoilValue(store.availableEndpoints);