Skip to content

Commit

Permalink
🐛 fix: conditionally omit error (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas authored Sep 10, 2024
1 parent beb2834 commit f2a494d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions starters/next/components/ui/CTA/CTA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ export const CTA = ({
{actions && actions.length > 0 && (
<div className="flex flex-wrap justify-center gap-4">
{actions.slice(0, 2).map(
({ text, href, variant, ...actionProps }, index) =>
({ text, href, variant }, index) =>
href && (
<Button
key={index}
variant={variant || index === 1 ? 'outline' : 'default'}
asChild
{...actionProps}
>
<a href={href}>{text}</a>
</Button>
Expand Down
3 changes: 1 addition & 2 deletions starters/next/components/ui/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ export const Hero = ({
{actions && actions.length > 0 && (
<div className="flex flex-wrap justify-center gap-4 lg:justify-start">
{actions.slice(0, 2).map(
({ text, href, variant, ...actionProps }, index) =>
({ text, href, variant }, index) =>
href && (
<Button
key={index}
variant={variant || index === 1 ? 'outline' : 'default'}
asChild
{...actionProps}
>
<a href={href}>{text}</a>
</Button>
Expand Down
3 changes: 1 addition & 2 deletions starters/remix/app/components/ui/CTA/CTA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ export const CTA = ({
{actions && actions.length > 0 && (
<div className="flex flex-wrap justify-center gap-4">
{actions.slice(0, 2).map(
({ text, href, variant, ...actionProps }, index) =>
({ text, href, variant }, index) =>
href && (
<Button
key={index}
variant={variant || index === 1 ? 'outline' : 'default'}
asChild
{...actionProps}
>
<a href={href}>{text}</a>
</Button>
Expand Down
3 changes: 1 addition & 2 deletions starters/remix/app/components/ui/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ export const Hero = ({
{actions && actions.length > 0 && (
<div className="flex flex-wrap justify-center gap-4 lg:justify-start">
{actions.slice(0, 2).map(
({ text, href, variant, ...actionProps }, index) =>
({ text, href, variant }, index) =>
href && (
<Button
key={index}
variant={variant || index === 1 ? 'outline' : 'default'}
asChild
{...actionProps}
>
<a href={href}>{text}</a>
</Button>
Expand Down

0 comments on commit f2a494d

Please sign in to comment.