feat(frontend): update translate library

This commit is contained in:
이강준
2022-12-11 10:54:53 +09:00
parent 96ebe3e3d2
commit 0e53b78708
53 changed files with 645 additions and 550 deletions
+13 -1
View File
@@ -1,5 +1,6 @@
import { useEffect } from "react";
import { useRouter } from "next/router";
import { appWithTranslation } from "next-i18next";
import { config } from "@fortawesome/fontawesome-svg-core";
import { initPostHog } from "~/components/analytics/posthog";
@@ -18,6 +19,17 @@ const App = ({ Component, pageProps, ...appProps }) => {
const router = useRouter();
const posthog = initPostHog();
// useEffect(() => {
// const storedLang = localStorage.getItem("lang");
// console.log(router.locale);
// console.log(storedLang);
// if (router.locale ?? "en" !== storedLang ?? "en") {
// router.push(router.pathname, router.pathname, {
// locale: storedLang ?? "en",
// });
// }
// }, [router.locale, router.pathname]);
useEffect(() => {
// Init for auto capturing
const posthog = initPostHog();
@@ -56,7 +68,7 @@ const App = ({ Component, pageProps, ...appProps }) => {
);
};
export default App;
export default appWithTranslation(App);
{
/* <Script