Skip to content

Commit

Permalink
do not show tooltip when connecting wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
maxaleks committed Feb 5, 2024
1 parent 467bf2c commit 4ccffbe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/snippets/walletMenu/WalletTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ const WalletTooltip = ({ children, isDisabled, isMobile }: Props) => {
const wasShown = window.localStorage.getItem(localStorageKey);
const isMarketplacePage = [ '/apps', '/apps/[id]' ].includes(router.pathname);
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(() => {
setIsTooltipShown.on();
window.localStorage.setItem(localStorageKey, 'true');
Expand Down

0 comments on commit 4ccffbe

Please sign in to comment.