Skip to content

Commit 50207d3

Browse files
authored
add referrals to simulator (#131)
1 parent 2188cb5 commit 50207d3

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed
Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
import React from 'react';
2-
import { TwitterShareButton } from 'react-share';
32
import styles from './common.module.css';
4-
import { BsTwitterX } from 'react-icons/bs';
3+
import { BsGift } from 'react-icons/bs';
4+
import { openDashboard } from '../../lib/helpers/linkHelper';
55

66
export function NavbarShareButton() {
77
return (
8-
<TwitterShareButton
9-
url={'https://walletguard.app'}
10-
title={
11-
'Join 100,000+ wallets already protected using Wallet Guard. Proactively detect wallet drainers & phishing scams so you can transact confidently in your preferred wallet.'
12-
}
13-
via={'wallet_guard'}
14-
>
15-
<div className={styles['buttonWithIcon']}>
16-
Share
17-
<BsTwitterX style={{ marginLeft: '5px' }} />
18-
</div>
19-
</TwitterShareButton>
8+
<div className={styles['buttonWithIcon']} onClick={() => openDashboard('referrals')}>
9+
Share
10+
<BsGift style={{ marginLeft: '5px' }} />
11+
</div>
2012
);
2113
}

src/lib/helpers/linkHelper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export function openDashboard(source: string) {
99
chrome.tabs.create({ url: 'https://dashboard.walletguard.app/settings/extension/?client=extension&source=settings' });
1010
} else if (source === 'install') {
1111
chrome.tabs.create({ url: 'https://dashboard.walletguard.app/onboarding/welcome/?client=extension&source=install' });
12+
} else if (source === 'referrals') {
13+
chrome.tabs.create({ url: 'https://dashboard.walletguard.app/?referrals&client=extension&source=referrals' });
1214
} else {
1315
chrome.tabs.create({ url: 'https://dashboard.walletguard.app/?client=extension&source=' + source });
1416
}

0 commit comments

Comments
 (0)