diff --git a/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx b/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx index 9ecc5f23d..4eb1821bc 100644 --- a/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx +++ b/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx @@ -1014,8 +1014,9 @@ const ListObjects = ({ match, history }: IListObjectsProps) => { [bucketName, dispatch, simplePath] ); + const onDrop = useCallback( - (acceptedFiles) => { + (acceptedFiles: any[]) => { if (acceptedFiles && acceptedFiles.length > 0) { let newFolderPath: string = acceptedFiles[0].path; uploadObject(acceptedFiles, newFolderPath); diff --git a/portal-ui/src/screens/Console/Common/ContentBox.tsx b/portal-ui/src/screens/Console/Common/ContentBox.tsx index da0b0775b..5c52617ae 100644 --- a/portal-ui/src/screens/Console/Common/ContentBox.tsx +++ b/portal-ui/src/screens/Console/Common/ContentBox.tsx @@ -17,7 +17,9 @@ import React from "react"; import { Box } from "@mui/material"; -type Props = {}; +type Props = { + children: React.ReactNode; +}; const ContentBox: React.FC = ({ children }) => { return ( diff --git a/portal-ui/src/screens/Console/Common/FormLayout.tsx b/portal-ui/src/screens/Console/Common/FormLayout.tsx index 079ca0729..4f84d7cef 100644 --- a/portal-ui/src/screens/Console/Common/FormLayout.tsx +++ b/portal-ui/src/screens/Console/Common/FormLayout.tsx @@ -22,6 +22,7 @@ type Props = { title: string; icon: React.ReactNode; helpbox?: React.ReactNode; + children: React.ReactNode; }; const FormLayout: React.FC = ({ children, title, helpbox, icon }) => { diff --git a/portal-ui/src/screens/Console/Common/SectionH1.tsx b/portal-ui/src/screens/Console/Common/SectionH1.tsx index b82605dd4..b7064e472 100644 --- a/portal-ui/src/screens/Console/Common/SectionH1.tsx +++ b/portal-ui/src/screens/Console/Common/SectionH1.tsx @@ -16,7 +16,9 @@ import React from "react"; -type Props = {}; +type Props = { + children: string; +}; const SectionH1: React.FC = ({ children }) => { return ( diff --git a/portal-ui/src/screens/Console/Common/SectionTitle.tsx b/portal-ui/src/screens/Console/Common/SectionTitle.tsx index 54fb0fba1..c30eae713 100644 --- a/portal-ui/src/screens/Console/Common/SectionTitle.tsx +++ b/portal-ui/src/screens/Console/Common/SectionTitle.tsx @@ -21,6 +21,7 @@ type Props = { separator?: boolean; actions?: React.ReactNode; icon?: React.ReactNode; + children: string; }; const SectionTitle: React.FC = ({ diff --git a/portal-ui/src/screens/Console/Common/TableWrapper/TableActionButton.tsx b/portal-ui/src/screens/Console/Common/TableWrapper/TableActionButton.tsx index 710601c18..a6c8d2bbd 100644 --- a/portal-ui/src/screens/Console/Common/TableWrapper/TableActionButton.tsx +++ b/portal-ui/src/screens/Console/Common/TableWrapper/TableActionButton.tsx @@ -13,7 +13,7 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -import React, { Component } from "react"; +import React from "react"; import isString from "lodash/isString"; import { Link } from "react-router-dom"; import createStyles from "@mui/styles/createStyles"; @@ -44,7 +44,7 @@ const styles = () => interface IActionButton { label?: string; - type: string | Component; + type: string | React.ReactNode; onClick?: (id: string) => any; to?: string; valueToSend: any; diff --git a/portal-ui/src/screens/Console/Menu/MenuItem.tsx b/portal-ui/src/screens/Console/Menu/MenuItem.tsx index 2cda7fd1d..3af3f4c28 100644 --- a/portal-ui/src/screens/Console/Menu/MenuItem.tsx +++ b/portal-ui/src/screens/Console/Menu/MenuItem.tsx @@ -96,7 +96,7 @@ const MenuItem = ({ ); const selectMenuHandler = useCallback( - (e) => { + (e: any) => { onExpand(page.id); setSelectedMenuItem(page.id); page.onClick && page.onClick(e); diff --git a/portal-ui/src/screens/Console/NotificationEndpoints/AddNotificationEndpoint.tsx b/portal-ui/src/screens/Console/NotificationEndpoints/AddNotificationEndpoint.tsx index 1d42e1033..65dbb75b9 100644 --- a/portal-ui/src/screens/Console/NotificationEndpoints/AddNotificationEndpoint.tsx +++ b/portal-ui/src/screens/Console/NotificationEndpoints/AddNotificationEndpoint.tsx @@ -149,7 +149,7 @@ const AddNotificationEndpoint = ({ }; const onValueChange = useCallback( - (newValue) => { + (newValue: IElementValue[]) => { setValueArr(newValue); }, [setValueArr] diff --git a/portal-ui/src/screens/Console/NotificationEndpoints/CustomForms/EditConfiguration.tsx b/portal-ui/src/screens/Console/NotificationEndpoints/CustomForms/EditConfiguration.tsx index 3ac420693..aee830fe6 100644 --- a/portal-ui/src/screens/Console/NotificationEndpoints/CustomForms/EditConfiguration.tsx +++ b/portal-ui/src/screens/Console/NotificationEndpoints/CustomForms/EditConfiguration.tsx @@ -131,7 +131,7 @@ const EditConfiguration = ({ }; const onValueChange = useCallback( - (newValue) => { + (newValue:IElementValue[]) => { setValueObj(newValue); }, [setValueObj] diff --git a/portal-ui/src/screens/Console/Users/AddUserServiceAccountScreen.tsx b/portal-ui/src/screens/Console/Users/AddUserServiceAccountScreen.tsx index 59ddafd62..160247a5d 100644 --- a/portal-ui/src/screens/Console/Users/AddUserServiceAccountScreen.tsx +++ b/portal-ui/src/screens/Console/Users/AddUserServiceAccountScreen.tsx @@ -178,7 +178,7 @@ const AddServiceAccount = ({ classes, match }: IAddServiceAccountProps) => { > }> - Create Service Account for {userName} + {`Create Service Account for ${userName}`}