create-expo-updates-server 0.3.0 → 0.6.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.
Files changed (191) hide show
  1. package/README.md +4 -2
  2. package/dist/template/Dockerfile +4 -6
  3. package/dist/template/README.md +5 -10
  4. package/dist/template/app/api/admin/device-favorites/route.test.ts +125 -0
  5. package/dist/template/app/api/admin/device-favorites/route.ts +91 -0
  6. package/dist/template/app/api/admin/distribution-history/restore/route.ts +39 -0
  7. package/dist/template/app/api/admin/distribution-history/route.test.ts +55 -0
  8. package/dist/template/app/api/admin/distribution-history/route.ts +24 -0
  9. package/dist/template/app/api/admin/updates/[encodedKey]/deactivate/route.ts +2 -1
  10. package/dist/template/app/api/admin/updates/[encodedKey]/promote/route.ts +2 -1
  11. package/dist/template/app/api/admin/updates/[encodedKey]/rollback/route.ts +2 -1
  12. package/dist/template/app/api/admin/updates/[encodedKey]/route.ts +2 -1
  13. package/dist/template/app/api/admin/updates/route.test.ts +21 -0
  14. package/dist/template/app/api/admin/updates/route.ts +12 -1
  15. package/dist/template/app/globals.css +65 -68
  16. package/dist/template/app/login/page.tsx +66 -42
  17. package/dist/template/app/updates/[encodedKey]/page.tsx +382 -248
  18. package/dist/template/app/updates/devices/page.tsx +187 -145
  19. package/dist/template/app/updates/embedded/page.tsx +80 -34
  20. package/dist/template/app/updates/emergency-redirects/page.tsx +138 -71
  21. package/dist/template/app/updates/layout.tsx +2 -1
  22. package/dist/template/app/updates/page.tsx +385 -274
  23. package/dist/template/app/updates/releases.test.tsx +156 -0
  24. package/dist/template/components/admin/admin-role.ts +5 -0
  25. package/dist/template/components/admin/admin-shell.tsx +166 -95
  26. package/dist/template/components/admin/confirm-action.tsx +123 -0
  27. package/dist/template/components/admin/language-switcher.tsx +27 -16
  28. package/dist/template/components/admin/release-badges.test.tsx +50 -0
  29. package/dist/template/components/admin/release-badges.tsx +101 -0
  30. package/dist/template/components/ui/alert.tsx +10 -3
  31. package/dist/template/components/ui/avatar.tsx +108 -0
  32. package/dist/template/components/ui/badge.tsx +2 -2
  33. package/dist/template/components/ui/breadcrumb.tsx +108 -0
  34. package/dist/template/components/ui/button.tsx +5 -5
  35. package/dist/template/components/ui/card.tsx +2 -2
  36. package/dist/template/components/ui/chart.tsx +1 -1
  37. package/dist/template/components/ui/collapsible.tsx +7 -0
  38. package/dist/template/components/ui/dialog.tsx +13 -4
  39. package/dist/template/components/ui/empty.tsx +103 -0
  40. package/dist/template/components/ui/field.tsx +248 -0
  41. package/dist/template/components/ui/input-group.tsx +170 -0
  42. package/dist/template/components/ui/input.tsx +1 -1
  43. package/dist/template/components/ui/native-select.tsx +1 -1
  44. package/dist/template/components/ui/radio-group.tsx +41 -0
  45. package/dist/template/components/ui/sheet.tsx +6 -2
  46. package/dist/template/components/ui/sidebar.tsx +62 -17
  47. package/dist/template/components/ui/status-tones.ts +15 -0
  48. package/dist/template/components/ui/table.tsx +1 -1
  49. package/dist/template/components/ui/textarea.tsx +1 -1
  50. package/dist/template/docs/admin-ui.md +22 -24
  51. package/dist/template/docs/device-targeting.md +6 -12
  52. package/dist/template/docs/doctor.md +2 -2
  53. package/dist/template/docs/expo-app-setup.md +9 -27
  54. package/dist/template/docs/getting-started.md +3 -4
  55. package/dist/template/docs/getting-started.ru.md +11 -544
  56. package/dist/template/docs/index.md +1 -1
  57. package/dist/template/docs/installation-telemetry.md +6 -12
  58. package/dist/template/docs/migrations/2026-10-16-manifest-identity.sql +5 -0
  59. package/dist/template/docs/migrations/2026-11-25-device-favorites.sql +53 -0
  60. package/dist/template/docs/migrations/2026-11-25-download-on-postpone.sql +5 -0
  61. package/dist/template/docs/migrations/2026-11-25-public-distribution-history.sql +283 -0
  62. package/dist/template/docs/migrations/schema.sql +349 -0
  63. package/dist/template/docs/npm-installer.md +3 -3
  64. package/dist/template/docs/operations-guide.md +9 -7
  65. package/dist/template/docs/ota-client-lifecycle.md +30 -68
  66. package/dist/template/docs/ota-emergency-recovery.md +34 -57
  67. package/dist/template/docs/ota-update-policy.md +9 -20
  68. package/dist/template/docs/ru/admin-ui.md +33 -0
  69. package/dist/template/docs/ru/device-targeting.md +59 -0
  70. package/dist/template/docs/ru/doctor.md +98 -0
  71. package/dist/template/docs/ru/expo-app-setup.md +497 -0
  72. package/dist/template/docs/ru/getting-started.md +391 -0
  73. package/dist/template/docs/ru/index.md +50 -0
  74. package/dist/template/docs/ru/installation-telemetry.md +125 -0
  75. package/dist/template/docs/ru/npm-installer.md +71 -0
  76. package/dist/template/docs/ru/operations-guide.md +322 -0
  77. package/dist/template/docs/ru/ota-client-lifecycle.md +162 -0
  78. package/dist/template/docs/ru/ota-emergency-recovery.md +108 -0
  79. package/dist/template/docs/ru/ota-update-policy.md +69 -0
  80. package/dist/template/docs/ru/publishing-npm-installer.md +49 -0
  81. package/dist/template/docs/ru/supabase-setup.md +120 -0
  82. package/dist/template/docs/uk/admin-ui.md +33 -0
  83. package/dist/template/docs/uk/device-targeting.md +59 -0
  84. package/dist/template/docs/uk/doctor.md +98 -0
  85. package/dist/template/docs/uk/expo-app-setup.md +497 -0
  86. package/dist/template/docs/uk/getting-started.md +391 -0
  87. package/dist/template/docs/uk/index.md +50 -0
  88. package/dist/template/docs/uk/installation-telemetry.md +125 -0
  89. package/dist/template/docs/uk/npm-installer.md +71 -0
  90. package/dist/template/docs/uk/operations-guide.md +322 -0
  91. package/dist/template/docs/uk/ota-client-lifecycle.md +162 -0
  92. package/dist/template/docs/uk/ota-emergency-recovery.md +108 -0
  93. package/dist/template/docs/uk/ota-update-policy.md +69 -0
  94. package/dist/template/docs/uk/publishing-npm-installer.md +49 -0
  95. package/dist/template/docs/uk/supabase-setup.md +120 -0
  96. package/dist/template/lib/audience-ids.ts +4 -0
  97. package/dist/template/package-lock.json +46 -0
  98. package/dist/template/package.json +4 -1
  99. package/dist/template/scripts/configure-expo-app.mjs +3 -3
  100. package/dist/template/scripts/create-access-token.mjs +1 -1
  101. package/dist/template/scripts/lib/doctor.mjs +10 -7
  102. package/dist/template/scripts/lib/doctor.test.mjs +7 -5
  103. package/dist/template/scripts/lib/embedded-update-registrar.test.ts +22 -7
  104. package/dist/template/scripts/lib/expo-app-configurator.mjs +25 -22
  105. package/dist/template/scripts/lib/expo-app-configurator.test.ts +37 -2
  106. package/dist/template/scripts/lib/ota-client-configurator.mjs +152 -55
  107. package/dist/template/scripts/lib/ota-client-configurator.test.ts +60 -20
  108. package/dist/template/scripts/lib/ota-client-package.mjs +25 -0
  109. package/dist/template/scripts/lib/ota-root-hook-patcher.mjs +90 -32
  110. package/dist/template/scripts/lib/ota-root-hook-patcher.test.ts +49 -6
  111. package/dist/template/scripts/tests/device-analytics-migrations.mjs +12 -1
  112. package/dist/template/scripts/tests/device-targeting-activation.mjs +2 -3
  113. package/dist/template/scripts/tests/e2e/client-lifecycle.mjs +161 -0
  114. package/dist/template/scripts/tests/e2e/client-lifecycle.scenario.jsx +465 -0
  115. package/dist/template/scripts/tests/e2e/client-vitest.mts +18 -0
  116. package/dist/template/scripts/tests/e2e/console.mjs +86 -0
  117. package/dist/template/scripts/tests/e2e/delivery.mjs +296 -0
  118. package/dist/template/scripts/tests/e2e/device-favorites.mjs +309 -0
  119. package/dist/template/scripts/tests/e2e/installations.mjs +132 -0
  120. package/dist/template/scripts/tests/e2e/policy.mjs +253 -0
  121. package/dist/template/scripts/tests/e2e/registrar-token.mjs +59 -0
  122. package/dist/template/scripts/tests/e2e/release-matrix.mjs +307 -0
  123. package/dist/template/scripts/tests/e2e/releases.mjs +162 -0
  124. package/dist/template/scripts/tests/e2e/run.mjs +224 -0
  125. package/dist/template/scripts/tests/manifest-identity.sql +7 -5
  126. package/dist/template/scripts/tests/public-distribution-history.mjs +102 -0
  127. package/dist/template/src/client/admin-api.ts +45 -10
  128. package/dist/template/src/client/admin-types.ts +35 -1
  129. package/dist/template/src/client/devices/analytics.tsx +169 -219
  130. package/dist/template/src/client/devices/cohorts.tsx +181 -0
  131. package/dist/template/src/client/devices/device-name.tsx +37 -21
  132. package/dist/template/src/client/devices/favorite-targets.tsx +381 -0
  133. package/dist/template/src/client/devices/registry.tsx +265 -233
  134. package/dist/template/src/client/devices/use-devices-report.test.tsx +98 -0
  135. package/dist/template/src/client/devices/use-devices-report.ts +53 -82
  136. package/dist/template/src/client/devices/version-adoption-chart.tsx +48 -38
  137. package/dist/template/src/client/distribution-control.tsx +98 -53
  138. package/dist/template/src/client/distribution-history.tsx +353 -0
  139. package/dist/template/src/client/guard-action-catalog.tsx +183 -0
  140. package/dist/template/src/client/guard-action-combobox.test.ts +16 -22
  141. package/dist/template/src/client/guard-action-combobox.tsx +134 -234
  142. package/dist/template/src/client/guard-action-options.ts +4 -6
  143. package/dist/template/src/client/i18n/en.json +335 -2
  144. package/dist/template/src/client/i18n/language-switching.test.tsx +233 -0
  145. package/dist/template/src/client/i18n/messages.test.ts +102 -19
  146. package/dist/template/src/client/i18n/messages.ts +31 -16
  147. package/dist/template/src/client/i18n/provider.tsx +6 -3
  148. package/dist/template/src/client/i18n/ru.json +619 -0
  149. package/dist/template/src/client/i18n/uk.json +619 -0
  150. package/dist/template/src/client/i18n/use-formatters.ts +5 -0
  151. package/dist/template/src/client/logout-button.tsx +3 -3
  152. package/dist/template/src/client/policy-draft.ts +138 -0
  153. package/dist/template/src/client/update-audience-editor.tsx +597 -199
  154. package/dist/template/src/client/update-policy-editor.test.ts +101 -29
  155. package/dist/template/src/client/update-policy-editor.tsx +466 -307
  156. package/dist/template/src/client/use-filtered-results.ts +55 -0
  157. package/dist/template/src/server/controllers/manifest.test.ts +23 -3
  158. package/dist/template/src/server/controllers/manifest.ts +15 -1
  159. package/dist/template/src/server/devices/audience.ts +9 -5
  160. package/dist/template/src/server/lib/admin-audience-activation.test.ts +37 -90
  161. package/dist/template/src/server/lib/admin-release-history.test.ts +138 -0
  162. package/dist/template/src/server/lib/admin-updates.ts +160 -534
  163. package/dist/template/src/server/lib/distribution-history.ts +97 -0
  164. package/dist/template/src/server/lib/supabase.js +24 -0
  165. package/dist/template/src/server/lib/supabase.test.ts +38 -1
  166. package/dist/template/src/server/lib/update-policy.test.ts +20 -0
  167. package/dist/template/src/server/lib/update-policy.ts +23 -10
  168. package/dist/template/src/server/manifest/manifest-repository.ts +11 -3
  169. package/dist/template/src/server/manifest/manifest-values.test.ts +2 -0
  170. package/dist/template/src/server/manifest/manifest-values.ts +21 -13
  171. package/dist/template/templates/expo-app/scripts/ota-publish/api/database-client.mjs +7 -30
  172. package/dist/template/templates/expo-app/scripts/ota-register-embedded/index.mjs +2 -1
  173. package/dist/template/tsconfig.json +2 -2
  174. package/dist/template-manifest.json +571 -271
  175. package/package.json +1 -1
  176. package/dist/template/scripts/lib/device-identity.test.ts +0 -29
  177. package/dist/template/scripts/lib/ota-client.test.ts +0 -55
  178. package/dist/template/scripts/lib/ota-update-controller.test.ts +0 -232
  179. package/dist/template/scripts/lib/ota-updates-ui.test.tsx +0 -154
  180. package/dist/template/scripts/tests/ota-client-types.mjs +0 -69
  181. package/dist/template/templates/expo-app/ota-client/README.md +0 -73
  182. package/dist/template/templates/expo-app/ota-client/controller.ts +0 -107
  183. package/dist/template/templates/expo-app/ota-client/device-identity.ts +0 -48
  184. package/dist/template/templates/expo-app/ota-client/docs/update-lifecycle.md +0 -61
  185. package/dist/template/templates/expo-app/ota-client/index.ts +0 -16
  186. package/dist/template/templates/expo-app/ota-client/model/hooks/useOtaUpdates.ts +0 -97
  187. package/dist/template/templates/expo-app/ota-client/model/update-controller.ts +0 -293
  188. package/dist/template/templates/expo-app/ota-client/runtime.ts +0 -153
  189. package/dist/template/templates/expo-app/ota-client/types.ts +0 -85
  190. package/dist/template/templates/expo-app/ota-client/ui/ota-update-gate.tsx +0 -25
  191. package/dist/template/templates/expo-app/ota-client/ui/ota-updates.tsx +0 -196
@@ -1,40 +1,123 @@
1
+ import { readFileSync, readdirSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import ts from "typescript";
1
4
  import { describe, expect, it } from "vitest";
2
- import { createTranslator, resolveLocale } from "./messages";
5
+ import { createTranslator, resolveLocale, type Locale } from "./messages";
3
6
  import english from "./en.json";
7
+ import russian from "./ru.json";
8
+ import ukrainian from "./uk.json";
9
+
10
+ const catalogs = { en: english, ru: russian, uk: ukrainian };
4
11
 
5
12
  describe("admin interface language", () => {
6
- it("defaults to English regardless of an absent or unsupported preference", () => {
7
- expect(resolveLocale(undefined)).toBe("en");
8
- expect(resolveLocale("uk")).toBe("en");
9
- expect(resolveLocale("en")).toBe("en");
10
- expect(resolveLocale("ru")).toBe("ru");
13
+ it("resolves supported preferences and keeps English as the default", () => {
14
+ for (const locale of ["en", "ru", "uk"]) {
15
+ expect(resolveLocale(locale)).toBe(locale);
16
+ }
17
+ for (const locale of [undefined, "ua", "de", "constructor"]) {
18
+ expect(resolveLocale(locale)).toBe("en");
19
+ }
11
20
  });
12
- it("translates labels without translating recipient data", () => {
21
+
22
+ it("translates labels and English API errors without translating user data", () => {
13
23
  expect(createTranslator("en")("Установки")).toBe("Installations");
14
24
  expect(createTranslator("ru")("Установки")).toBe("Установки");
25
+ expect(createTranslator("uk")("Установки")).toBe("Встановлення");
15
26
  expect(createTranslator("ru")("Invalid credentials")).toBe(
16
27
  "Неверные учётные данные",
17
28
  );
29
+ expect(createTranslator("uk")("Invalid credentials")).toBe(
30
+ "Неправильні облікові дані",
31
+ );
32
+ expect(
33
+ createTranslator("uk")("fromChannel and toChannel must differ"),
34
+ ).toBe("Початковий і цільовий канали мають відрізнятися");
18
35
  expect(
19
- createTranslator("en")("Канал {0}, {1}", ["Мой канал", "android"]),
20
- ).toBe("Channel Мой канал, android");
36
+ createTranslator("uk")("Канал {0}, {1}", ["Мой канал", "android"]),
37
+ ).toBe("Канал Мой канал, android");
21
38
  expect(createTranslator("en")("Скопировать {0}", ["$& <script>"])).toBe(
22
39
  "Copy $& <script>",
23
40
  );
24
41
  });
25
- it("preserves every interpolation slot in the English catalog", () => {
26
- const slots = (s: string) =>
27
- [...s.matchAll(/\{\d+\}/g)].map(([value]) => value).sort();
28
- for (const [source, translated] of Object.entries(english)) {
29
- expect(translated.trim(), source).not.toBe("");
30
- expect(translated, source).not.toMatch(/[А-Яа-яЁё]/);
31
- expect(slots(translated), source).toEqual(slots(source));
42
+
43
+ it("can render an existing notification in another language", () => {
44
+ const notice = { key: "Policy saved as version {0}.", values: [3] };
45
+ expect(createTranslator("en")(notice)).toBe(
46
+ "Policy saved as version 3.",
47
+ );
48
+ expect(createTranslator("ru")(notice)).toBe(
49
+ "Политика сохранена как версия 3.",
50
+ );
51
+ expect(createTranslator("uk")(notice)).toBe(
52
+ "Політику збережено як версію 3.",
53
+ );
54
+ });
55
+
56
+ it.each(Object.keys(catalogs) as Locale[])(
57
+ "keeps %s complete with matching interpolation slots",
58
+ (locale) => {
59
+ const slots = (s: string) =>
60
+ [...s.matchAll(/\{\d+\}/g)].map(([value]) => value).sort();
61
+ expect(Object.keys(catalogs[locale]).sort()).toEqual(
62
+ Object.keys(english).sort(),
63
+ );
64
+ for (const [source, translated] of Object.entries(catalogs[locale])) {
65
+ expect(translated.trim(), source).not.toBe("");
66
+ expect(slots(translated), source).toEqual(slots(source));
67
+ if (locale === "en")
68
+ expect(translated, source).not.toMatch(/[А-Яа-яЁёІіЇїЄєҐґ]/);
69
+ if (locale === "uk")
70
+ expect(translated, source).not.toMatch(/[ыэъёЫЭЪЁ]/);
71
+ }
72
+ },
73
+ );
74
+
75
+ it("has translations for every literal UI translation key", () => {
76
+ function files(directory: string): string[] {
77
+ return readdirSync(directory, { withFileTypes: true }).flatMap(
78
+ (entry) => {
79
+ const path = join(directory, entry.name);
80
+ return entry.isDirectory()
81
+ ? files(path)
82
+ : /\.tsx?$/.test(path) && !path.includes(".test.")
83
+ ? [path]
84
+ : [];
85
+ },
86
+ );
87
+ }
88
+ const keys = new Set([
89
+ ...Object.keys(english),
90
+ ...Object.values(english),
91
+ ]);
92
+ for (const path of ["app", "components", "src/client"].flatMap(files)) {
93
+ const source = ts.createSourceFile(
94
+ path,
95
+ readFileSync(path, "utf8"),
96
+ ts.ScriptTarget.Latest,
97
+ true,
98
+ );
99
+ function visit(node: ts.Node) {
100
+ if (
101
+ ts.isCallExpression(node) &&
102
+ node.expression.getText(source) === "t"
103
+ ) {
104
+ const key = node.arguments[0];
105
+ if (key && ts.isStringLiteral(key))
106
+ expect(keys.has(key.text), `${path}: ${key.text}`).toBe(true);
107
+ }
108
+ ts.forEachChild(node, visit);
109
+ }
110
+ visit(source);
32
111
  }
33
112
  });
113
+
34
114
  it("preserves unknown technical errors and incomplete placeholders", () => {
35
- expect(createTranslator("en")("HTTP 503")).toBe("HTTP 503");
36
- expect(createTranslator("en")("constructor")).toBe("constructor");
37
- expect(createTranslator("ru")("toString")).toBe("toString");
115
+ for (const locale of Object.keys(catalogs) as Locale[]) {
116
+ const t = createTranslator(locale);
117
+ expect(t("HTTP 503")).toBe("HTTP 503");
118
+ expect(t("constructor")).toBe("constructor");
119
+ expect(t("toString")).toBe("toString");
120
+ }
38
121
  expect(createTranslator("en")("Канал {0}, {1}", ["preview"])).toBe(
39
122
  "Channel preview, {1}",
40
123
  );
@@ -1,31 +1,46 @@
1
1
  import english from "./en.json";
2
+ import russian from "./ru.json";
3
+ import ukrainian from "./uk.json";
2
4
 
3
- const englishByRussian = new Map<string, string>(Object.entries(english));
4
- const russianByEnglish = new Map<string, string>(
5
- Object.entries(english).map(([russian, translated]) => [translated, russian]),
5
+ const catalogs = {
6
+ en: new Map(Object.entries(english)),
7
+ ru: new Map(Object.entries(russian)),
8
+ uk: new Map(Object.entries(ukrainian)),
9
+ };
10
+ // Also accept English API errors and labels from the original interface.
11
+ const keysByEnglish = new Map(
12
+ Object.entries(english).map(([key, translated]) => [translated, key]),
6
13
  );
7
14
 
8
- export type Locale = "en" | "ru";
15
+ export type Locale = "en" | "ru" | "uk";
16
+ export const formatLocales: Record<Locale, string> = {
17
+ en: "en-US",
18
+ ru: "ru-RU",
19
+ uk: "uk-UA",
20
+ };
21
+ type TranslationValues = readonly (string | number | null | undefined)[];
22
+ export type TranslationMessage =
23
+ string | { key: string; values?: TranslationValues };
9
24
  export const LOCALE_COOKIE = "ota-locale";
10
25
  export const defaultLocale: Locale = "en";
11
26
  export function resolveLocale(value: string | undefined): Locale {
12
- return value === "ru" ? "ru" : defaultLocale;
27
+ return value === "ru" || value === "uk" ? value : defaultLocale;
13
28
  }
14
29
 
15
- /** Original Russian messages are keys; interpolate values without translating user data. */
30
+ /** Translate at render time so existing notices follow language changes too. */
16
31
  export function createTranslator(locale: Locale) {
17
- return (
18
- message: string,
19
- values: readonly (string | number | null | undefined)[] = [],
20
- ) => {
21
- const translated =
22
- locale === "en"
23
- ? (englishByRussian.get(message) ?? message)
24
- : (russianByEnglish.get(message) ?? message);
32
+ return (message: TranslationMessage, values: TranslationValues = []) => {
33
+ const source = typeof message === "string" ? message : message.key;
34
+ const replacements =
35
+ typeof message === "string" ? values : (message.values ?? []);
36
+ const key = catalogs.en.has(source)
37
+ ? source
38
+ : (keysByEnglish.get(source) ?? source);
39
+ const translated = catalogs[locale].get(key) ?? source;
25
40
  return translated.replace(/\{(\d+)\}/g, (placeholder, index) =>
26
- values[Number(index)] === undefined
41
+ replacements[Number(index)] === undefined
27
42
  ? placeholder
28
- : String(values[Number(index)]),
43
+ : String(replacements[Number(index)]),
29
44
  );
30
45
  };
31
46
  }
@@ -10,13 +10,14 @@ import {
10
10
  import {
11
11
  createTranslator,
12
12
  defaultLocale,
13
+ formatLocales,
13
14
  LOCALE_COOKIE,
14
15
  type Locale,
15
16
  } from "./messages";
16
17
 
17
18
  const defaultValue = {
18
19
  locale: defaultLocale,
19
- formatLocale: "en-US",
20
+ formatLocale: formatLocales[defaultLocale],
20
21
  t: createTranslator(defaultLocale),
21
22
  setLocale: (_locale: Locale) => {
22
23
  void _locale;
@@ -35,7 +36,7 @@ export function LocaleProvider({
35
36
  const value = useMemo(
36
37
  () => ({
37
38
  locale,
38
- formatLocale: locale === "ru" ? "ru-RU" : "en-US",
39
+ formatLocale: formatLocales[locale],
39
40
  t: createTranslator(locale),
40
41
  setLocale(next: Locale) {
41
42
  document.cookie = `${LOCALE_COOKIE}=${next}; Path=/; Max-Age=31536000; SameSite=Lax`;
@@ -46,7 +47,9 @@ export function LocaleProvider({
46
47
  [locale],
47
48
  );
48
49
  return (
49
- <LocaleContext.Provider value={value}>{children}</LocaleContext.Provider>
50
+ <LocaleContext.Provider value={value}>
51
+ {children}
52
+ </LocaleContext.Provider>
50
53
  );
51
54
  }
52
55