only autoset referrer if not authenticated

This commit is contained in:
jessop 2020-10-07 13:02:09 -04:00 committed by Sean Yesmunt
parent 10ce772bcb
commit 3ca19744c4

View file

@ -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) {