Skip to content

Commit

Permalink
feat(api): add alert when api return string
Browse files Browse the repository at this point in the history
  • Loading branch information
ahonestla committed Dec 1, 2023
1 parent 1eca0ae commit aa96a9a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion client/src/pages/home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,15 @@ export default function Home() {
<PageSpinner />
</Container>
)}
{!isFetching && data && (
{!isFetching && typeof data === 'string' && (
<Alert
title="Error"
description={data}
type="error"
closable
/>
)}
{!isFetching && data?.graph && (
<Container>
<Graph data={data} />
<Button
Expand Down

0 comments on commit aa96a9a

Please sign in to comment.