Commit 4ccffbeb authored by Max Alekseenko's avatar Max Alekseenko

do not show tooltip when connecting wallet

parent 467bf2c8
...@@ -31,8 +31,10 @@ const WalletTooltip = ({ children, isDisabled, isMobile }: Props) => { ...@@ -31,8 +31,10 @@ const WalletTooltip = ({ children, isDisabled, isMobile }: Props) => {
const wasShown = window.localStorage.getItem(localStorageKey); const wasShown = window.localStorage.getItem(localStorageKey);
const isMarketplacePage = [ '/apps', '/apps/[id]' ].includes(router.pathname); const isMarketplacePage = [ '/apps', '/apps/[id]' ].includes(router.pathname);
const isTooltipShowAction = router.query.action === 'tooltip'; const isTooltipShowAction = router.query.action === 'tooltip';
const isConnectWalletAction = router.query.action === 'connect';
const needToShow = (!wasShown && !isConnectWalletAction) || isTooltipShowAction;
if (!isDisabled && isMarketplacePage && (!wasShown || isTooltipShowAction)) { if (!isDisabled && isMarketplacePage && needToShow) {
setTimeout(() => { setTimeout(() => {
setIsTooltipShown.on(); setIsTooltipShown.on();
window.localStorage.setItem(localStorageKey, 'true'); window.localStorage.setItem(localStorageKey, 'true');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment