Merge pull request #1275 from hydralauncher/fix/set-userDetails-after-login
Some checks failed
Release / build (ubuntu-latest) (push) Has been cancelled
Release / build (windows-latest) (push) Has been cancelled

fix: set window.userDetails after login
This commit is contained in:
Zamitto 2024-12-04 21:11:13 -03:00 committed by GitHub
commit c9eed85a00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View File

@ -119,8 +119,6 @@ export function App() {
if (response) {
updateUserDetails(response);
syncFriendRequests();
window["userDetails"] = response;
}
})
.finally(() => {

View File

@ -56,6 +56,8 @@ export function useUserDetails() {
clearUserDetails();
}
window["userDetails"] = userDetails;
return userDetails;
});
}, [clearUserDetails]);

View File

@ -20,6 +20,7 @@ import resources from "@locales";
import { RepacksContextProvider } from "./context";
import { SuspenseWrapper } from "./components";
import { logger } from "./logger";
const Home = React.lazy(() => import("./pages/home/home"));
const GameDetails = React.lazy(
@ -34,6 +35,8 @@ const Achievements = React.lazy(
() => import("./pages/achievements/achievements")
);
console.log = logger.log;
i18n
.use(LanguageDetector)
.use(initReactI18next)