Skip to content

Commit 7bd88f5

Browse files
committed
fix(datachecks): make check on data less verbose
1 parent 127bbff commit 7bd88f5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

components/profile/hypercerts-tab/hypercerts-tab-content-claimable.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export async function ClaimableContent({ address }: ClaimableContentProps) {
1212
claimed: false,
1313
});
1414

15-
if (!response || !response.data || response.data.length === 0) {
15+
if (!response?.data?.length) {
1616
return <EmptySection />;
1717
}
1818

components/profile/hypercerts-tab/hypercerts-tab-content-created.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface CreatedContentProps {
99
export async function CreatedContent({ address }: CreatedContentProps) {
1010
const response = await getHypercertsByCreator({ creatorAddress: address });
1111

12-
if (!response || !response.data || response.data.length === 0) {
12+
if (!response?.data?.length) {
1313
return <EmptySection />;
1414
}
1515

components/profile/hypercerts-tab/hypercerts-tab-content-owned.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getHypercertsByOwner } from "@/hypercerts/actions/getHypercertsByOwner"
55
export const OwnedContent = async ({ address }: { address: string }) => {
66
const response = await getHypercertsByOwner({ ownerAddress: address });
77

8-
if (!response || !response.data || response.data.length === 0) {
8+
if (!response?.data?.length) {
99
return <EmptySection />;
1010
}
1111

0 commit comments

Comments
 (0)