Skip to content

Commit 7a87dcd

Browse files
committed
use onclick instead of href
1 parent 151eb67 commit 7a87dcd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/react/MainMenu.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ const MainMenuBase = ({
215215
<div className={styles['product-link']}>
216216
{linksParsed?.map(([name, link], i, arr) => {
217217
if (!link.startsWith('http')) link = `https://${link}`
218+
const finalLink = link
218219
return <div style={{
219220
color: 'lightgray',
220221
fontSize: 8,
@@ -223,7 +224,12 @@ const MainMenuBase = ({
223224
key={name}
224225
style={{
225226
whiteSpace: 'nowrap',
226-
}} href={link}
227+
cursor: 'pointer',
228+
}}
229+
onClick={(e) => {
230+
e.preventDefault()
231+
openURL(finalLink, false)
232+
}}
227233
>{name}
228234
</a>
229235
{i < arr.length - 1 && <span style={{ marginLeft: 2 }}>·</span>}

0 commit comments

Comments
 (0)