Skip to content

Commit

Permalink
[skip ci] fix skeletons for home page indicators widget
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2drum committed Jan 19, 2024
1 parent e56e875 commit c9d7786
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ui/home/indicators/ChainIndicatorItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ChainIndicatorItem = ({ id, title, value, icon, isSelected, onClick, stats
return null;
}

if (stats.isPending) {
if (stats.isPlaceholderData) {
return (
<Skeleton
h={ 3 }
Expand All @@ -46,7 +46,7 @@ const ChainIndicatorItem = ({ id, title, value, icon, isSelected, onClick, stats
);
}

if (stats.isError) {
if (!stats.data) {
return <Text variant="secondary" fontWeight={ 400 }>no data</Text>;
}

Expand Down
4 changes: 2 additions & 2 deletions ui/home/indicators/ChainIndicators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ const ChainIndicators = () => {
}

const valueTitle = (() => {
if (statsQueryResult.isPending) {
if (statsQueryResult.isPlaceholderData) {
return <Skeleton h="48px" w="215px" mt={ 3 } mb={ 4 }/>;
}

if (statsQueryResult.isError) {
if (!statsQueryResult.data) {
return <Text mt={ 3 } mb={ 4 }>There is no data</Text>;
}

Expand Down

0 comments on commit c9d7786

Please sign in to comment.