diff options
Diffstat (limited to 'frontend/src/components')
| -rw-r--r-- | frontend/src/components/QuickAccessVisibleState.tsx | 4 | ||||
| -rw-r--r-- | frontend/src/components/WithSuspense.tsx | 2 | ||||
| -rw-r--r-- | frontend/src/components/modals/filepicker/FilePickerError.tsx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/components/QuickAccessVisibleState.tsx b/frontend/src/components/QuickAccessVisibleState.tsx index f5c05061..f90c24b4 100644 --- a/frontend/src/components/QuickAccessVisibleState.tsx +++ b/frontend/src/components/QuickAccessVisibleState.tsx @@ -1,10 +1,10 @@ -import { FC, ReactNode, createContext, useContext, useState } from 'react'; +import { FC, PropsWithChildren, createContext, useContext, useState } from 'react'; const QuickAccessVisibleState = createContext<boolean>(false); export const useQuickAccessVisible = () => useContext(QuickAccessVisibleState); -export const QuickAccessVisibleStateProvider: FC<{ tab: any; children: ReactNode }> = ({ children, tab }) => { +export const QuickAccessVisibleStateProvider: FC<PropsWithChildren<{ tab: any }>> = ({ children, tab }) => { const initial = tab.initialVisibility; const [visible, setVisible] = useState<boolean>(initial); // HACK but i can't think of a better way to do this diff --git a/frontend/src/components/WithSuspense.tsx b/frontend/src/components/WithSuspense.tsx index 153bec8d..d6281e3e 100644 --- a/frontend/src/components/WithSuspense.tsx +++ b/frontend/src/components/WithSuspense.tsx @@ -10,7 +10,7 @@ interface WithSuspenseProps { const WithSuspense: FunctionComponent<WithSuspenseProps> = (props) => { const propsCopy = { ...props }; delete propsCopy.children; - (props.children as ReactElement)?.props && Object.assign((props.children as ReactElement).props, propsCopy); // There is probably a better way to do this but valve does it this way so ¯\_(ツ)_/¯ + (props.children as ReactElement<any>)?.props && Object.assign((props.children as ReactElement<any>).props, propsCopy); // There is probably a better way to do this but valve does it this way so ¯\_(ツ)_/¯ return ( <Suspense fallback={ diff --git a/frontend/src/components/modals/filepicker/FilePickerError.tsx b/frontend/src/components/modals/filepicker/FilePickerError.tsx index f2330b9a..ac672226 100644 --- a/frontend/src/components/modals/filepicker/FilePickerError.tsx +++ b/frontend/src/components/modals/filepicker/FilePickerError.tsx @@ -1,4 +1,4 @@ -import { FC, useEffect, useState } from 'react'; +import { FC, JSX, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { IconContext } from 'react-icons'; import { FaExclamationTriangle, FaQuestionCircle, FaUserSlash } from 'react-icons/fa'; |
