mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 07:30:20 +00:00
feat(frontend): update translate library
This commit is contained in:
+13
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user