Merge branch 'main' into fix/fixing-local-images

This commit is contained in:
Chubby Granny Chaser
2024-12-08 13:15:52 +00:00
committed by GitHub
13 changed files with 156 additions and 46 deletions

View File

@@ -119,21 +119,6 @@ export function App() {
if (response) {
updateUserDetails(response);
syncFriendRequests();
const $existingScript = document.getElementById("user-details");
const content = `window.userDetails = ${JSON.stringify(response)};`;
if ($existingScript) {
$existingScript.textContent = content;
} else {
const $script = document.createElement("script");
$script.id = "user-details";
$script.type = "text/javascript";
$script.textContent = content;
document.head.appendChild($script);
}
}
})
.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)