aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/bug/BugQuery.tsx
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-03-21 21:31:14 +0100
committerGitHub <noreply@github.com>2021-03-21 21:31:14 +0100
commit52df5a1f1199d085b2bb10fb7ed5599dcb8307c4 (patch)
tree031a10e135ceb60c623aca994db9c4c701b7ef66 /webui/src/pages/bug/BugQuery.tsx
parent6744cddaa6ed25b9f2c0c61ef9df1823b5e74e6e (diff)
parentaeb26d0e84b14a44ed52e2fd158b01310e295e45 (diff)
downloadgit-bug-52df5a1f1199d085b2bb10fb7ed5599dcb8307c4.tar.gz
Merge pull request #600 from GlancingMind/upstream-improve-navigation
WebUI: Improve navigation
Diffstat (limited to 'webui/src/pages/bug/BugQuery.tsx')
-rw-r--r--webui/src/pages/bug/BugQuery.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/webui/src/pages/bug/BugQuery.tsx b/webui/src/pages/bug/BugQuery.tsx
index 2a70a2f8..5d459c42 100644
--- a/webui/src/pages/bug/BugQuery.tsx
+++ b/webui/src/pages/bug/BugQuery.tsx
@@ -3,6 +3,8 @@ import { RouteComponentProps } from 'react-router-dom';
import CircularProgress from '@material-ui/core/CircularProgress';
+import NotFoundPage from '../notfound/NotFoundPage';
+
import Bug from './Bug';
import { useGetBugQuery } from './BugQuery.generated';
@@ -15,8 +17,8 @@ const BugQuery: React.FC<Props> = ({ match }: Props) => {
variables: { id: match.params.id },
});
if (loading) return <CircularProgress />;
+ if (!data?.repository?.bug) return <NotFoundPage />;
if (error) return <p>Error: {error}</p>;
- if (!data?.repository?.bug) return <p>404.</p>;
return <Bug bug={data.repository.bug} />;
};