Skip to content

Commit a59b0aa

Browse files
committed
fix: open in new tab not working on Top Bar links
1 parent 572d7c5 commit a59b0aa

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/components/TopBar/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import { ArrowIcon } from '@icons/ArrowIcon'
66
import classes from './index.module.scss'
77

88
export const TopBar: React.FC<TopBarType> = ({ link, message }) => {
9-
const { type, label, reference, url } = link || {}
10-
119
return (
12-
<CMSLink className={classes.topBar} reference={reference} type={type} url={url}>
13-
<span className={classes.message}>{message}</span>
14-
<span className={classes.label}>{label}</span>
15-
<ArrowIcon />
16-
</CMSLink>
10+
link && (
11+
<CMSLink className={classes.topBar} {...link} label={undefined}>
12+
<span className={classes.message}>{message}</span>
13+
<span className={classes.label}>{link.label}</span>
14+
<ArrowIcon />
15+
</CMSLink>
16+
)
1717
)
1818
}

0 commit comments

Comments
 (0)