Skip to content

Commit

Permalink
fix(dashboard): Do not render preview action when nullish (#7113)
Browse files Browse the repository at this point in the history
  • Loading branch information
desiprisg authored Nov 24, 2024
1 parent 2ee186a commit f3641c8
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ export const InAppPreviewPrimaryAction = (props: InAppPreviewPrimaryActionProps)
return <Skeleton className="h-5 w-[12ch]" />;
}

if (!children) {
return null;
}

return (
<Button
className={cn('px-3 text-xs font-medium shadow-none', className)}
Expand All @@ -153,6 +157,10 @@ export const InAppPreviewSecondaryAction = (props: InAppPreviewSecondaryActionPr
return <Skeleton className="h-5 w-[12ch]" />;
}

if (!children) {
return null;
}

return (
<Button variant="outline" className={cn('px-3 text-xs font-medium', className)} type="button" size="xs" {...rest}>
{children}
Expand Down

0 comments on commit f3641c8

Please sign in to comment.