Skip to content

Commit

Permalink
Merge pull request #1796 from gchq/BAI-1456-fix-model-and-datacard-ta…
Browse files Browse the repository at this point in the history
…b-loading

Bai 1456 fix model and datacard tab loading
  • Loading branch information
IR96334 authored Feb 6, 2025
2 parents f258678 + 375487c commit 9ff769c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions frontend/pages/data-card/[dataCardId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ export default function DataCard() {
return (
<>
<Title text={dataCard ? dataCard.name : 'Loading...'} />
{isDataCardLoading && <Loading />}
{dataCard && (
{!dataCard || isDataCardLoading ? (
<Loading />
) : (
<PageWithTabs
title={dataCard.name}
subheading={`ID: ${dataCard.id}`}
Expand Down
5 changes: 3 additions & 2 deletions frontend/pages/model/[modelId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ export default function Model() {
return (
<>
<Title text={model ? model.name : 'Loading...'} />
{(isModelLoading || isCurrentUserLoading || isUiConfigLoading) && <Loading />}
{model && (
{!model || isModelLoading || isCurrentUserLoading || isUiConfigLoading ? (
<Loading />
) : (
<PageWithTabs
title={model.name}
subheading={`ID: ${model.id}`}
Expand Down

0 comments on commit 9ff769c

Please sign in to comment.