Skip to content

Commit ef1efbb

Browse files
authored
fix(app): show insight not found instead of loading (#6593)
1 parent ec1238d commit ef1efbb

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.changeset/itchy-grapes-do.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hive': patch
3+
---
4+
5+
Fix operation insights showing loading for missing operations

packages/web/app/src/pages/target-insights-operation.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function GraphQLOperationBody(props: {
3333
return <GraphQLHighlight className="pt-6" code={operation.body} />;
3434
}
3535

36-
return <div>Loading...</div>;
36+
return <div>Operation not found.</div>;
3737
}
3838

3939
const Operation_View_OperationBodyQuery = graphql(`
@@ -147,7 +147,11 @@ function OperationView({
147147
)}
148148
<div className="mt-12 w-full rounded-md border border-gray-800 bg-gray-900/50 p-5">
149149
<Section.Title>Operation body</Section.Title>
150-
<GraphQLOperationBody operation={result.data?.target?.operation ?? null} />
150+
{result.fetching ? (
151+
<div>Loading...</div>
152+
) : (
153+
<GraphQLOperationBody operation={result.data?.target?.operation ?? null} />
154+
)}
151155
</div>
152156
</>
153157
);

0 commit comments

Comments
 (0)