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:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { Grid } from '@material-ui/core';
|
||||
import {
|
||||
Header,
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
} from '@backstage/core';
|
||||
import NewRelicFetchComponent from '../NewRelicFetchComponent';
|
||||
|
||||
const NewRelicComponent: FC<{}> = () => (
|
||||
const NewRelicComponent = () => (
|
||||
<Page themeId="tool">
|
||||
<Header title="New Relic">
|
||||
<HeaderLabel label="Owner" value="Engineering" />
|
||||
|
||||
@@ -14,15 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { Progress, Table, TableColumn, useApi } from '@backstage/core';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
import { useAsync } from 'react-use';
|
||||
import { newRelicApiRef, NewRelicApplications } from '../../api';
|
||||
|
||||
export const NewRelicAPMTable: FC<NewRelicApplications> = ({
|
||||
applications,
|
||||
}) => {
|
||||
export const NewRelicAPMTable = ({ applications }: NewRelicApplications) => {
|
||||
const columns: TableColumn[] = [
|
||||
{ title: 'Application', field: 'name' },
|
||||
{ title: 'Response Time', field: 'responseTime' },
|
||||
@@ -61,7 +59,7 @@ export const NewRelicAPMTable: FC<NewRelicApplications> = ({
|
||||
);
|
||||
};
|
||||
|
||||
const NewRelicFetchComponent: FC<{}> = () => {
|
||||
const NewRelicFetchComponent = () => {
|
||||
const api = useApi(newRelicApiRef);
|
||||
|
||||
const { value, loading, error } = useAsync(async () => {
|
||||
|
||||
Reference in New Issue
Block a user