Commit c9d77868 authored by tom's avatar tom

[skip ci] fix skeletons for home page indicators widget

parent e56e8754
......@@ -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 }
......@@ -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>;
}
......
......@@ -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>;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment