fix: remove old code
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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('/');
|
||||
|
||||
Reference in New Issue
Block a user