Skip to content

Commit

Permalink
Various fixes for RR
Browse files Browse the repository at this point in the history
  • Loading branch information
gabro committed Oct 18, 2024
1 parent 1b65408 commit 2d6082d
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 5 deletions.
3 changes: 0 additions & 3 deletions templates/react-router-monorepo/apps/app/app/entry.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ await i18next

registerCustomFormats(i18next);

console.log(I18nextProvider);
console.log(i18next);

startTransition(() => {
hydrateRoot(
document,
Expand Down
1 change: 0 additions & 1 deletion templates/react-router-monorepo/apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"react-dom": "^18.3.1",
"react-i18next": "^15.0.3",
"react-router": "7.0.0-pre.1",
"react-router-dom": "7.0.0-pre.1",
"remix-i18next": "^6.4.1"
},
"devDependencies": {
Expand Down
7 changes: 6 additions & 1 deletion templates/react-router-monorepo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@
"devDependencies": {
"nx": "^20.0.0"
},
"packageManager": "pnpm@9.7.0"
"packageManager": "pnpm@9.7.0",
"pnpm": {
"patchedDependencies": {
"remix-i18next": "patches/remix-i18next.patch"
}
}
}
39 changes: 39 additions & 0 deletions templates/react-router-monorepo/patches/remix-i18next.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/build/react.js b/build/react.js
index a88fb299dd40bb979b2b03de5df55f83b55f2ad8..9602b2e6b6427bb1cc2b7dd9fe557c73a567416a 100644
--- a/build/react.js
+++ b/build/react.js
@@ -1,4 +1,4 @@
-import { useMatches } from "@remix-run/react";
+import { useMatches } from "react-router";
import * as React from "react";
import { useTranslation } from "react-i18next";
/**
diff --git a/build/server.d.ts b/build/server.d.ts
index 78b15659e8fc5dfaadce155ddfb55de367a914f8..b79ca613d44a7ecf192ab2667dcfacf3c4226bb7 100644
--- a/build/server.d.ts
+++ b/build/server.d.ts
@@ -1,4 +1,4 @@
-import type { Cookie, EntryContext, SessionStorage } from "@remix-run/server-runtime";
+import type { Cookie, EntryContext, SessionStorage } from "react-router";
import { type BackendModule, type DefaultNamespace, type FlatNamespace, type InitOptions, type KeyPrefix, type Module, type Namespace, type NewableModule, type TFunction } from "i18next";
type FallbackNs<Ns> = Ns extends undefined ? DefaultNamespace : Ns extends Namespace ? Ns : DefaultNamespace;
export interface LanguageDetectorOption {
diff --git a/package.json b/package.json
index 2cc14cbc211e9ffade9c2186b823387a2c14d964..b7b9c3599bde2b217dee154fe2f67f9109feef4f 100644
--- a/package.json
+++ b/package.json
@@ -32,10 +32,10 @@
"typescript": "^5.6.2"
},
"peerDependencies": {
- "@remix-run/cloudflare": "^2.0.0",
- "@remix-run/deno": "^2.0.0",
- "@remix-run/node": "^2.0.0",
- "@remix-run/react": "^2.0.0",
+ "@react-router/cloudflare": "^7.0.0",
+ "@react-router/deno": "^7.0.0",
+ "@react-router/node": "^7.0.0",
+ "react-router": "^7.0.0",
"i18next": "^23.1.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-i18next": "^13.0.0 || ^14.0.0 || ^15.0.0"

0 comments on commit 2d6082d

Please sign in to comment.