fix: Regression loading shares in #5552

fix: Double auth.info load with multiple tabs open
fix: Request loop when suspended with multiple tabs open
This commit is contained in:
Tom Moor
2023-07-15 21:10:22 -04:00
parent 39e12cef65
commit e653b185a4
3 changed files with 14 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import LoadingIndicator from "~/components/LoadingIndicator";
import { Redirect } from "react-router-dom";
import useStores from "~/hooks/useStores";
import { changeLanguage } from "~/utils/language";
@@ -24,7 +24,8 @@ const Authenticated = ({ children }: Props) => {
return children;
}
return <LoadingIndicator />;
void auth.logout(true);
return <Redirect to="/" />;
};
export default observer(Authenticated);