Skip to content

Commit 247e318

Browse files
committed
remove i18next related deps
1 parent bcce87b commit 247e318

File tree

15 files changed

+18
-227
lines changed

15 files changed

+18
-227
lines changed

.eslintrc.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,6 @@
6565
"varsIgnorePattern": "^_$"
6666
}
6767
],
68-
"unused-imports/no-unused-imports-ts": "warn",
69-
"no-restricted-imports": [
70-
"warn",
71-
{
72-
"paths": [
73-
{
74-
"name": "react-i18next",
75-
"message": "Please use next-i18next instead of react-i18next."
76-
}
77-
]
78-
}
79-
]
68+
"unused-imports/no-unused-imports-ts": "warn"
8069
}
8170
}

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"config ⚙️":
1717
- i18n.config.json
1818
- next.config.js
19-
- next-i18next.config,js
2019
- next-sitemap.config.js
2120
- tsconfig.json
2221
- .nvmrc

.storybook/ChakraDecorator.tsx

Lines changed: 0 additions & 64 deletions
This file was deleted.

.storybook/i18next.ts

Lines changed: 0 additions & 72 deletions
This file was deleted.

.storybook/modes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pickBy from "lodash/pickBy"
22

3-
import { baseLocales } from "./i18next"
3+
import { baseLocales } from "./next-intl"
44
import { breakpointSet } from "./preview"
55

66
export const viewportModes = breakpointSet.reduce<{

docs/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Markdown will be translated as whole pages of content, so no specific action is
5252

5353
- _tl;dr Each individual JSON entry should be a complete phrase by itself_
5454

55-
- This is done using the `Translation` component. However there is an alternative method for regular JS: using the `t` function from `next-i18next`
55+
- This is done using the `Translation` component. However there is an alternative method for regular JS: using the `t` function from `@/hooks/useTranslation`
5656

5757
- **Method one: `<Translation />` component (preferred if only needed in JSX)**
5858

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,10 @@
6464
"framer-motion": "^10.13.0",
6565
"gray-matter": "^4.0.3",
6666
"htmr": "^1.0.2",
67-
"i18next": "^23.6.0",
6867
"lodash.merge": "^4.6.2",
6968
"lodash.shuffle": "^4.2.0",
7069
"lodash.union": "^4.6.0",
7170
"next": "^14.2.21",
72-
"next-i18next": "^14.0.3",
7371
"next-intl": "^3.26.3",
7472
"next-mdx-remote": "^3.0.8",
7573
"next-sitemap": "^4.2.3",
@@ -81,7 +79,6 @@
8179
"react-dom": "^18.2.0",
8280
"react-emoji-render": "^2.0.1",
8381
"react-hook-form": "^7.52.1",
84-
"react-i18next": "^13.3.1",
8582
"react-icons": "^4.10.1",
8683
"react-lite-youtube-embed": "^2.4.0",
8784
"react-select": "5.8.0",

src/lib/types.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { Options } from "mdast-util-toc"
22
import type { NextPage } from "next"
33
import type { AppProps } from "next/app"
44
import type { StaticImageData } from "next/image"
5-
import type { SSRConfig } from "next-i18next"
65
import type { ReactElement, ReactNode } from "react"
76
import type { ColumnDef } from "@tanstack/react-table"
87

@@ -55,8 +54,10 @@ export type Root = {
5554
lastDeployLocaleTimestamp: string
5655
}
5756

58-
export type BasePageProps = SSRConfig &
59-
Pick<Root, "contentNotTranslated" | "lastDeployLocaleTimestamp">
57+
export type BasePageProps = Pick<
58+
Root,
59+
"contentNotTranslated" | "lastDeployLocaleTimestamp"
60+
>
6061

6162
export type Params = {
6263
locale: string

src/pages/[locale]/[...slug].tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import type {
77
GetStaticProps,
88
InferGetStaticPropsType,
99
} from "next/types"
10-
import type { SSRConfig } from "next-i18next"
1110
import { MDXRemote, type MDXRemoteSerializeResult } from "next-mdx-remote"
1211
import { serialize } from "next-mdx-remote/serialize"
1312
import { getPlaiceholder } from "plaiceholder"
@@ -108,11 +107,10 @@ export const getStaticPaths = (() => {
108107
}
109108
}) satisfies GetStaticPaths<Params>
110109

111-
type Props = Omit<Parameters<LayoutMappingType[Layout]>[0], "children"> &
112-
SSRConfig & {
113-
mdxSource: MDXRemoteSerializeResult
114-
gfissues: Awaited<ReturnType<typeof fetchGFIs>>
115-
}
110+
type Props = Omit<Parameters<LayoutMappingType[Layout]>[0], "children"> & {
111+
mdxSource: MDXRemoteSerializeResult
112+
gfissues: Awaited<ReturnType<typeof fetchGFIs>>
113+
}
116114

117115
const commitHistoryCache: CommitHistory = {}
118116

src/pages/[locale]/layer-2/learn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { GetStaticProps } from "next"
2-
import { useTranslation } from "next-i18next"
32

43
import type { BasePageProps, Lang, Params } from "@/lib/types"
54

@@ -20,6 +19,7 @@ import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
2019

2120
import { DEFAULT_LOCALE, LOCALES_CODES } from "@/lib/constants"
2221

22+
import useTranslation from "@/hooks/useTranslation"
2323
import loadNamespaces from "@/i18n/loadNamespaces"
2424
import { usePathname } from "@/i18n/routing"
2525
import Callout2Image from "@/public/images/layer-2/learn-hero.png"

0 commit comments

Comments
 (0)