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]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!hasNavigated && hasUnclaimedRefereeReward) {
|
||||
if (!hasNavigated && hasUnclaimedRefereeReward && !isAuthenticated) {
|
||||
const valid = isURIValid(uri);
|
||||
if (valid) {
|
||||
const { path } = parseURI(uri);
|
||||
setReferrer(path);
|
||||
if (path !== 'undefined') setReferrer(path);
|
||||
}
|
||||
}
|
||||
}, [hasNavigated, uri, hasUnclaimedRefereeReward, setReferrer]);
|
||||
}, [hasNavigated, uri, hasUnclaimedRefereeReward, setReferrer, isAuthenticated]);
|
||||
|
||||
useEffect(() => {
|
||||
if (uri) {
|
||||
|
|
Loading…
Add table
Reference in a new issue