Skip to content

Commit

Permalink
Merge pull request #1275 from hydralauncher/fix/set-userDetails-after…
Browse files Browse the repository at this point in the history
…-login

fix: set window.userDetails after login
  • Loading branch information
zamitto authored Dec 5, 2024
2 parents 5450443 + 988c01f commit c9eed85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/renderer/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ export function App() {
if (response) {
updateUserDetails(response);
syncFriendRequests();

window["userDetails"] = response;
}
})
.finally(() => {
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/hooks/use-user-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export function useUserDetails() {
clearUserDetails();
}

window["userDetails"] = userDetails;

return userDetails;
});
}, [clearUserDetails]);
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -34,6 +35,8 @@ const Achievements = React.lazy(
() => import("./pages/achievements/achievements")
);

console.log = logger.log;

i18n
.use(LanguageDetector)
.use(initReactI18next)
Expand Down

0 comments on commit c9eed85

Please sign in to comment.