mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-31 17:31:27 +00:00
only autoset referrer if not authenticated
This commit is contained in:
parent
10ce772bcb
commit
3ca19744c4
1 changed files with 3 additions and 3 deletions
|
@ -140,14 +140,14 @@ function AppRouter(props: Props) {
|
||||||
}, [hasNavigated, setHasNavigated]);
|
}, [hasNavigated, setHasNavigated]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!hasNavigated && hasUnclaimedRefereeReward) {
|
if (!hasNavigated && hasUnclaimedRefereeReward && !isAuthenticated) {
|
||||||
const valid = isURIValid(uri);
|
const valid = isURIValid(uri);
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const { path } = parseURI(uri);
|
const { path } = parseURI(uri);
|
||||||
setReferrer(path);
|
if (path !== 'undefined') setReferrer(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [hasNavigated, uri, hasUnclaimedRefereeReward, setReferrer]);
|
}, [hasNavigated, uri, hasUnclaimedRefereeReward, setReferrer, isAuthenticated]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (uri) {
|
if (uri) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue