fix: remove old code

This commit is contained in:
Shashank Bairy R
2020-09-29 13:45:59 +05:30
parent 62845150c0
commit 7c78bc66b2
2 changed files with 2 additions and 12 deletions
@@ -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<BackstageTheme>(theme => ({
},
}));
export const EntityNotFound: FC<{}> = () => {
export const EntityNotFound = () => {
const classes = useStyles();
return (
-10
View File
@@ -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('/');