use constant for redirection delay time

This commit is contained in:
btzr-io 2021-08-08 00:59:41 -05:00
parent 6e2bab4175
commit dd8a27f6d0

View file

@ -5,6 +5,8 @@ import Yrbl from 'component/yrbl';
import Button from 'component/button'; import Button from 'component/button';
const { buildURI } = require('lbry-redux'); const { buildURI } = require('lbry-redux');
const DELAY_TIME = 1500;
// Landing page for opening lbry urls on external applications. // Landing page for opening lbry urls on external applications.
type Props = { type Props = {
match: { match: {
@ -38,7 +40,7 @@ const OpenInDesktop = (props: Props) => {
setTimeout(() => { setTimeout(() => {
setTitle('Ready!'); setTitle('Ready!');
window.open(claimUrl, '_top'); window.open(claimUrl, '_top');
}, 1500); }, DELAY_TIME);
} }
}, [claimUrl]); }, [claimUrl]);