Skip to content

Commit

Permalink
bump packages and fix translations
Browse files Browse the repository at this point in the history
  • Loading branch information
madisvain committed Jan 8, 2024
1 parent 42b400b commit e47d308
Show file tree
Hide file tree
Showing 8 changed files with 764 additions and 841 deletions.
2 changes: 1 addition & 1 deletion components/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Link from "next/link";

import LanguageDropdown from "./language";

const Navigation = ({ scrollToContact }) => {
const Navigation = () => {
return (
<nav>
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const moduleExports = withBundleAnalyzer({
defaultLocale: "et",
localeDetection: false,
},
reactStrictMode: true,
reactStrictMode: false,
experimental: {
swcPlugins: [["@lingui/swc-plugin", {}]],
},
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"hamburger-react": "^2.5.0",
"lodash": "^4.17.21",
"mathjs": "^12.0.0",
"next": "14.0.2",
"next": "14.0.4",
"react": "18.2.0",
"react-day-picker": "^8.9.1",
"react-dom": "18.2.0",
Expand All @@ -33,15 +33,15 @@
"@lingui/cli": "^4.5.0",
"@lingui/loader": "^4.5.0",
"@lingui/macro": "^4.5.0",
"@lingui/swc-plugin": "^4.0.2",
"@lingui/swc-plugin": "^4.0.4",
"@tailwindcss/forms": "^0.5.7",
"@types/node": "20.9.0",
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"@types/node": "20.10.7",
"@types/react": "18.2.47",
"@types/react-dom": "18.2.18",
"autoprefixer": "^10.4.16",
"cypress": "^13.5.0",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.5",
"typescript": "5.2.2"
"typescript": "5.3.3"
}
}
3 changes: 3 additions & 0 deletions pages/404.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Custom404() {
return <h1>404 - Page Not Found</h1>;
}
36 changes: 15 additions & 21 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { i18n } from "@lingui/core";
import { I18nProvider } from "@lingui/react";
import { Inter } from "next/font/google";
import localFont from "next/font/local";
import { useEffect } from "react";
import { useRouter } from "next/router";

import Footer from "components/footer";
import Navigation from "components/navigation";
Expand Down Expand Up @@ -43,29 +41,25 @@ const general = localFont({
function App({ Component, pageProps }) {
useLinguiInit(pageProps.translation);

const router = useRouter();

return (
<>
<div className={`${inter.variable} ${general.variable}`}>
<I18nProvider i18n={i18n}>
<div className={`${inter.variable} ${general.variable}`}>
<div className="background">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>

<Navigation />
<Component {...pageProps} />
<Footer />
<div className="background">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>

<Navigation />
<Component {...pageProps} />
<Footer />
</I18nProvider>
</>
</div>
);
}

Expand Down
9 changes: 7 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"baseUrl": "."
"baseUrl": ".",
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
Expand Down
2 changes: 1 addition & 1 deletion utils/lingui.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function useLinguiInit(messages) {
// to avoid calling loadAndActivate for (worst case) each request, but right now that's what we do
i18n.loadAndActivate({ locale, messages });
}
if (isClient && i18n.locale === undefined) {
if (isClient && !i18n.locale) {
// first client render
i18n.loadAndActivate({ locale, messages });
}
Expand Down
Loading

1 comment on commit e47d308

@vercel
Copy link

@vercel vercel bot commented on e47d308 Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.