Added missing types required for React 18 migration (#2034)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
import React from "react";
|
||||
import { Box } from "@mui/material";
|
||||
|
||||
type Props = {};
|
||||
type Props = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
const ContentBox: React.FC<Props> = ({ children }) => {
|
||||
return (
|
||||
|
||||
@@ -22,6 +22,7 @@ type Props = {
|
||||
title: string;
|
||||
icon: React.ReactNode;
|
||||
helpbox?: React.ReactNode;
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
const FormLayout: React.FC<Props> = ({ children, title, helpbox, icon }) => {
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
|
||||
import React from "react";
|
||||
|
||||
type Props = {};
|
||||
type Props = {
|
||||
children: string;
|
||||
};
|
||||
|
||||
const SectionH1: React.FC<Props> = ({ children }) => {
|
||||
return (
|
||||
|
||||
@@ -21,6 +21,7 @@ type Props = {
|
||||
separator?: boolean;
|
||||
actions?: React.ReactNode;
|
||||
icon?: React.ReactNode;
|
||||
children: string;
|
||||
};
|
||||
|
||||
const SectionTitle: React.FC<Props> = ({
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
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;
|
||||
|
||||
@@ -96,7 +96,7 @@ const MenuItem = ({
|
||||
);
|
||||
|
||||
const selectMenuHandler = useCallback(
|
||||
(e) => {
|
||||
(e: any) => {
|
||||
onExpand(page.id);
|
||||
setSelectedMenuItem(page.id);
|
||||
page.onClick && page.onClick(e);
|
||||
|
||||
@@ -149,7 +149,7 @@ const AddNotificationEndpoint = ({
|
||||
};
|
||||
|
||||
const onValueChange = useCallback(
|
||||
(newValue) => {
|
||||
(newValue: IElementValue[]) => {
|
||||
setValueArr(newValue);
|
||||
},
|
||||
[setValueArr]
|
||||
|
||||
@@ -131,7 +131,7 @@ const EditConfiguration = ({
|
||||
};
|
||||
|
||||
const onValueChange = useCallback(
|
||||
(newValue) => {
|
||||
(newValue:IElementValue[]) => {
|
||||
setValueObj(newValue);
|
||||
},
|
||||
[setValueObj]
|
||||
|
||||
@@ -178,7 +178,7 @@ const AddServiceAccount = ({ classes, match }: IAddServiceAccountProps) => {
|
||||
>
|
||||
<Box>
|
||||
<SectionTitle icon={<ServiceAccountCredentialsIcon />}>
|
||||
Create Service Account for {userName}
|
||||
{`Create Service Account for ${userName}`}
|
||||
</SectionTitle>
|
||||
<form
|
||||
noValidate
|
||||
|
||||
Reference in New Issue
Block a user