Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

fix: component source bug

Dillion Verma57c281b5bf3a
diff --git a/components/component-source.tsx b/components/component-source.tsx
index 02bc13b2..77162682 100644
--- a/components/component-source.tsx
+++ b/components/component-source.tsx
@@ -35,7 +35,10 @@ export function ComponentSource({
if (isLoading) return null;
// TODO: Make this cleaner
- if (data?.user?.customer.payments.length === 0 && data?.user.role !== "ADMIN")
+ if (
+ data?.user?.customer?.payments.length === 0 &&
+ data?.user.role !== "ADMIN"
+ )
return <Preview />;
return (