@nextjscms/plugin-google-analytics 2.0.10 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;gBAKk3D,CAAC;iBAA2B,CAAC;;;;;;;;;;;;GAD/6D,CAAA"}
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;gBAKy3D,CAAC;iBAA2B,CAAC;;;;;;;;;;;;GADt7D,CAAA"}
package/dist/server.js CHANGED
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { api, HydrateClient } from 'nextjs-cms/api/trpc/server';
3
3
  import { GoogleAnalyticsPage } from './client/AnalyticsPage.js';
4
4
  import { findPluginRouteByPath } from 'nextjs-cms/plugins/server';
5
- import { resolveLocalizedString, resolveLocale } from 'nextjs-cms/translations';
5
+ import { resolveMultilingualString, resolveLanguage } from 'nextjs-cms/translations';
6
6
  import { getCMSConfig } from 'nextjs-cms/core';
7
7
  import auth from 'nextjs-cms/auth';
8
8
  export default async function GoogleAnalyticsServer() {
@@ -19,7 +19,7 @@ export default async function GoogleAnalyticsServer() {
19
19
  getCMSConfig(),
20
20
  ]);
21
21
  const { supportedLanguages, fallbackLanguage } = config.i18n;
22
- const locale = resolveLocale(session?.user?.locale, supportedLanguages, fallbackLanguage);
23
- const resolvedTitle = route ? resolveLocalizedString(route.title, locale, fallbackLanguage) : '';
22
+ const language = resolveLanguage(session?.user?.language, supportedLanguages, fallbackLanguage);
23
+ const resolvedTitle = route ? resolveMultilingualString(route.title, language, fallbackLanguage) : '';
24
24
  return (_jsx(HydrateClient, { children: _jsx(GoogleAnalyticsPage, { title: resolvedTitle }) }));
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextjscms/plugin-google-analytics",
3
- "version": "2.0.10",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "peerDependencies": {
26
26
  "react": "19.2.3",
27
27
  "react-dom": "19.2.3",
28
- "nextjs-cms": "0.8.10"
28
+ "nextjs-cms": "0.9.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/react": "^19.2.7",