diff --git a/plugins/catalog/src/components/EntityNotFound/EntityNotFound.tsx b/plugins/catalog/src/components/EntityNotFound/EntityNotFound.tsx index be38d8f025..c7560c6894 100644 --- a/plugins/catalog/src/components/EntityNotFound/EntityNotFound.tsx +++ b/plugins/catalog/src/components/EntityNotFound/EntityNotFound.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import React, { FC } from 'react'; +import React from 'react'; import { Grid, Button, Typography } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import { BackstageTheme } from '@backstage/theme'; @@ -34,7 +34,7 @@ const useStyles = makeStyles(theme => ({ }, })); -export const EntityNotFound: FC<{}> = () => { +export const EntityNotFound = () => { const classes = useStyles(); return ( diff --git a/plugins/catalog/src/hooks/useEntity.ts b/plugins/catalog/src/hooks/useEntity.ts index ac4973161e..1f076c0a05 100644 --- a/plugins/catalog/src/hooks/useEntity.ts +++ b/plugins/catalog/src/hooks/useEntity.ts @@ -20,8 +20,6 @@ import { catalogApiRef } from '../api/types'; import { useAsync } from 'react-use'; import { Entity } from '@backstage/catalog-model'; -// const REDIRECT_DELAY = 2000; - type EntityLoadingStatus = { entity?: Entity; loading: boolean; @@ -47,14 +45,6 @@ export const useEntityFromUrl = (): EntityLoadingStatus => { ); useEffect(() => { - // Commenting to check EntityNotFound page - // if (error || (!loading && !entity)) { - // errorApi.post(new Error('Entity not found!')); - // setTimeout(() => { - // navigate('/'); - // }, REDIRECT_DELAY); - // } - if (!name) { errorApi.post(new Error('No name provided!')); navigate('/');