Skip to content

Commit 3aee7f8

Browse files
committed
Fix build
1 parent 36fc677 commit 3aee7f8

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

modules/app/components/layout/header/Banner.tsx

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,19 @@ const Banner = ({
2626
variant?: string;
2727
href?: string;
2828
}): React.ReactElement => {
29-
const Link = href ? ExternalLink : React.Fragment;
3029
const arrow = href ? <Icon name="chevron_right" size={2} ml={2} /> : null;
31-
const linkProps = href ? { href, title: '', color: 'white' } : {};
30+
const textComponent = (
31+
<Text
32+
as="p"
33+
sx={{
34+
animation: `${scroll} 30s linear infinite`,
35+
color: 'white'
36+
}}
37+
>
38+
{content} {arrow}
39+
</Text>
40+
);
41+
3242
return (
3343
<Alert
3444
variant={variant}
@@ -42,17 +52,13 @@ const Banner = ({
4252
}}
4353
>
4454
{typeof content === 'string' ? (
45-
<Link {...linkProps}>
46-
<Text
47-
as="p"
48-
sx={{
49-
animation: `${scroll} 30s linear infinite`,
50-
color: href ? 'white' : undefined
51-
}}
52-
>
53-
{content} {arrow}
54-
</Text>
55-
</Link>
55+
href ? (
56+
<ExternalLink href={href} title="" styles={{ color: 'white' }}>
57+
{textComponent}
58+
</ExternalLink>
59+
) : (
60+
<div>{textComponent}</div>
61+
)
5662
) : (
5763
content
5864
)}

0 commit comments

Comments
 (0)