Commit 9131bf0f authored by Max Alekseenko's avatar Max Alekseenko

show tooltip only on marketplace page

parent b5242959
......@@ -26,12 +26,15 @@ const WalletTooltip = ({ children, isDisabled, isMobile }: Props) => {
React.useEffect(() => {
const wasShown = window.localStorage.getItem(localStorageKey);
if (!isDisabled && !wasShown) {
const isMarketplacePage = [ '/apps', '/apps/[id]' ].includes(router.pathname);
if (!isDisabled && !wasShown && isMarketplacePage) {
setTimeout(() => {
setIsTooltipShown.on();
window.localStorage.setItem(localStorageKey, 'true');
setTimeout(() => setIsTooltipShown.off(), 3000);
setTimeout(() => setIsTooltipShown.off(), 5000);
}, 1000);
}
}, [ setIsTooltipShown, localStorageKey, isDisabled ]);
}, [ setIsTooltipShown, localStorageKey, isDisabled, router.pathname ]);
return (
<Tooltip
......
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