Skip to content

Commit

Permalink
fix: empty state
Browse files Browse the repository at this point in the history
  • Loading branch information
songwongtp committed Mar 27, 2024
1 parent aa9adbc commit d8ef43b
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,12 @@ export const ValidatorsTable = ({
const { data: assetInfos } = useAssetInfos({ withPrices: false });

if (isLoading) return <Loading />;
if (!data)
return (
<ErrorFetching
dataName={`${isActive ? "active" : "inactive"} validators`}
/>
);
if (!data) return <ErrorFetching dataName="validators" />;
if (!data.total)
return (
<EmptyState
imageVariant="empty"
message="This network does not have any validators."
message={`This network does not have any ${isActive ? "active" : "inactive"} validators.`}
withBorder
/>
);
Expand Down

0 comments on commit d8ef43b

Please sign in to comment.