Skip to content

Commit b394588

Browse files
committed
fix: update next-i18next to latest version
1 parent 217b15c commit b394588

7 files changed

Lines changed: 24 additions & 10 deletions

File tree

components/composite/OrderSummary/LineItemTypes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import LineItemOption from "@commercelayer/react-components/line_items/LineItemO
1010
import LineItemQuantity from "@commercelayer/react-components/line_items/LineItemQuantity"
1111
import { CronExpressionParser } from "cron-parser"
1212
import cronstrue from "cronstrue"
13-
import { useTranslation } from "next-i18next"
1413
import type React from "react"
14+
import { useTranslation } from "react-i18next"
1515
import "cronstrue/locales/en"
1616
import "cronstrue/locales/it"
1717
import "cronstrue/locales/de"

components/composite/OrderSummary/ReturnToCart/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useTranslation } from "next-i18next"
1+
import { useTranslation } from "react-i18next"
22

33
interface Props {
44
cartUrl: NullableType<string>

components/composite/RetryError/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ErrorContainer } from "components/composite/ErrorContainer"
22
import { ErrorCode, Text } from "components/composite/ErrorContainer/styled"
3-
import { useTranslation } from "next-i18next"
3+
import { useTranslation } from "react-i18next"
44

55
export const RetryError = () => {
66
const { t } = useTranslation()

components/composite/StepShipping/Errors/OutOfStock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Errors } from "@commercelayer/react-components/errors/Errors"
2-
import { Trans, useTranslation } from "next-i18next"
32
import { type Dispatch, type SetStateAction, useEffect } from "react"
3+
import { Trans, useTranslation } from "react-i18next"
44

55
interface Props {
66
messages: Parameters<typeof Errors>[0]["messages"]

components/composite/StepShipping/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import { StepContainer } from "components/ui/StepContainer"
2929
import { StepContent } from "components/ui/StepContent"
3030
import { StepHeader } from "components/ui/StepHeader"
3131
import { LINE_ITEMS_SHIPPABLE } from "components/utils/constants"
32-
import { Trans, useTranslation } from "next-i18next"
3332
import { useContext, useEffect, useMemo, useState } from "react"
33+
import { Trans, useTranslation } from "react-i18next"
3434

3535
import { NoShippingMethods } from "./Errors/NoShippingMethods"
3636
import { OutOfStock } from "./Errors/OutOfStock"

pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import "../styles/step-container.css"
1111
import "../styles/address-input.css"
1212
import "../styles/accordion.css"
1313

14-
import { appWithTranslation } from "next-i18next"
14+
import { appWithTranslation } from "next-i18next/pages"
1515

1616
import "components/data/i18n"
1717
import { loadNewRelicAgent } from "components/data/NewRelic"

tsconfig.json

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"downlevelIteration": true,
610
"allowJs": true,
711
"skipLibCheck": true,
@@ -10,13 +14,23 @@
1014
"noEmit": true,
1115
"esModuleInterop": true,
1216
"module": "esnext",
13-
"moduleResolution": "node",
17+
"moduleResolution": "bundler",
1418
"resolveJsonModule": true,
1519
"isolatedModules": true,
1620
"jsx": "react-jsx",
1721
"baseUrl": ".",
1822
"incremental": true
1923
},
20-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "specs"],
21-
"exclude": ["node_modules", "public", ".next", "playwright.config.*"]
24+
"include": [
25+
"next-env.d.ts",
26+
"**/*.ts",
27+
"**/*.tsx",
28+
"specs"
29+
],
30+
"exclude": [
31+
"node_modules",
32+
"public",
33+
".next",
34+
"playwright.config.*"
35+
]
2236
}

0 commit comments

Comments
 (0)