remove React's FC type from codebase (#3527)

* WIP-packages: remove React's FC type from codebase

* remove FC from other directories

* fix build failures

* add types to required packages
This commit is contained in:
Askar
2020-12-10 11:23:29 +01:00
committed by GitHub
parent 2cc444f16c
commit a6a2ca6204
96 changed files with 316 additions and 290 deletions
@@ -25,7 +25,7 @@ import { makeStyles } from '@material-ui/core/styles';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import { BuildStepAction } from 'circleci-api';
import moment from 'moment';
import React, { FC, Suspense, useEffect, useState } from 'react';
import React, { Suspense, useEffect, useState } from 'react';
const LazyLog = React.lazy(() => import('react-lazylog/build/LazyLog'));
moment.relativeTimeThreshold('ss', 0);
@@ -40,12 +40,17 @@ const useStyles = makeStyles({
},
});
export const ActionOutput: FC<{
export const ActionOutput = ({
url,
name,
className,
action,
}: {
url: string;
name: string;
className?: string;
action: BuildStepAction;
}> = ({ url, name, className, action }) => {
}) => {
const classes = useStyles();
const [messages, setMessages] = useState([]);
+2 -2
View File
@@ -14,11 +14,11 @@
* limitations under the License.
*/
import React, { FC } from 'react';
import React from 'react';
import { createRouteRef } from '@backstage/core';
import { SvgIcon, SvgIconProps } from '@material-ui/core';
const CircleCIIcon: FC<SvgIconProps> = props => (
const CircleCIIcon = (props: SvgIconProps) => (
<SvgIcon
{...props}
enableBackground="new 0 0 200 200"