Commit 1143b411 authored by Max Alekseenko's avatar Max Alekseenko

use SECOND const

parent 9131bf0f
...@@ -2,6 +2,8 @@ import { Tooltip, useBoolean, useOutsideClick } from '@chakra-ui/react'; ...@@ -2,6 +2,8 @@ import { Tooltip, useBoolean, useOutsideClick } from '@chakra-ui/react';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import React from 'react'; import React from 'react';
import { SECOND } from 'lib/consts';
type Props = { type Props = {
children: React.ReactNode; children: React.ReactNode;
isDisabled?: boolean; isDisabled?: boolean;
...@@ -31,8 +33,8 @@ const WalletTooltip = ({ children, isDisabled, isMobile }: Props) => { ...@@ -31,8 +33,8 @@ const WalletTooltip = ({ children, isDisabled, isMobile }: Props) => {
setTimeout(() => { setTimeout(() => {
setIsTooltipShown.on(); setIsTooltipShown.on();
window.localStorage.setItem(localStorageKey, 'true'); window.localStorage.setItem(localStorageKey, 'true');
setTimeout(() => setIsTooltipShown.off(), 5000); setTimeout(() => setIsTooltipShown.off(), 5 * SECOND);
}, 1000); }, SECOND);
} }
}, [ setIsTooltipShown, localStorageKey, isDisabled, router.pathname ]); }, [ setIsTooltipShown, localStorageKey, isDisabled, router.pathname ]);
......
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