Skip to content

Commit

Permalink
Update _link.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
xHomu committed Nov 28, 2024
1 parent 93d5d90 commit 0214c7f
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions app/routes/_editor+/blocks+/link/_link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,8 @@ export function LinkBlockElement({ element, children }: Props) {
}
url={element.icon.url}
alt={
children
? undefined
children && !element.hideLinkText
? ""
: element?.name ?? undefined
}
/>
Expand Down Expand Up @@ -609,7 +609,11 @@ export function LinkBlockElement({ element, children }: Props) {
width={!element.removeCircleBorder ? 60 : 120}
height={!element.removeCircleBorder ? 60 : undefined}
url={element.icon.url}
alt={children ? undefined : element?.name ?? undefined}
alt={
children && !element.hideLinkText
? ""
: element?.name ?? undefined
}
/>
) : (
<Icon name="component" className="text-1" size={12} />
Expand Down Expand Up @@ -651,7 +655,9 @@ export function LinkBlockElement({ element, children }: Props) {
}
url={element.icon.url}
alt={
children ? undefined : element?.name ?? undefined
children && !element.hideLinkText
? ""
: element?.name ?? undefined
}
/>
) : (
Expand All @@ -668,7 +674,9 @@ export function LinkBlockElement({ element, children }: Props) {
}}
url={element.icon.url}
alt={
children ? undefined : element?.name ?? undefined
children && !element.hideLinkText
? ""
: element?.name ?? undefined
}
/>
)}
Expand Down Expand Up @@ -704,7 +712,11 @@ export function LinkBlockElement({ element, children }: Props) {
element.iconWidth ? element.iconWidth * 2 : undefined
}
url={element.icon.url}
alt={children ? undefined : element?.name ?? undefined}
alt={
children && !element.hideLinkText
? ""
: element?.name ?? undefined
}
/>
) : (
<Image
Expand All @@ -717,7 +729,11 @@ export function LinkBlockElement({ element, children }: Props) {
width: element.iconWidth,
}}
url={element.icon.url}
alt={children ? undefined : element?.name ?? undefined}
alt={
children && !element.hideLinkText
? ""
: element?.name ?? undefined
}
/>
)}
{!element.hideLinkText ? undefined : (
Expand Down

0 comments on commit 0214c7f

Please sign in to comment.