create-expo-updates-server 0.3.0 → 0.4.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 (66) hide show
  1. package/dist/template/README.md +1 -1
  2. package/dist/template/app/updates/[encodedKey]/page.tsx +55 -33
  3. package/dist/template/app/updates/devices/page.tsx +13 -7
  4. package/dist/template/app/updates/embedded/page.tsx +25 -13
  5. package/dist/template/app/updates/emergency-redirects/page.tsx +70 -38
  6. package/dist/template/app/updates/page.tsx +33 -20
  7. package/dist/template/components/admin/admin-shell.tsx +11 -5
  8. package/dist/template/components/admin/language-switcher.tsx +5 -2
  9. package/dist/template/components/ui/dialog.tsx +13 -4
  10. package/dist/template/components/ui/sheet.tsx +6 -2
  11. package/dist/template/components/ui/sidebar.tsx +62 -17
  12. package/dist/template/docs/admin-ui.md +18 -24
  13. package/dist/template/docs/device-targeting.md +4 -5
  14. package/dist/template/docs/getting-started.ru.md +11 -544
  15. package/dist/template/docs/index.md +1 -1
  16. package/dist/template/docs/installation-telemetry.md +4 -4
  17. package/dist/template/docs/operations-guide.md +1 -1
  18. package/dist/template/docs/ota-emergency-recovery.md +34 -57
  19. package/dist/template/docs/ru/admin-ui.md +29 -0
  20. package/dist/template/docs/ru/device-targeting.md +59 -0
  21. package/dist/template/docs/ru/doctor.md +98 -0
  22. package/dist/template/docs/ru/expo-app-setup.md +497 -0
  23. package/dist/template/docs/ru/getting-started.md +391 -0
  24. package/dist/template/docs/ru/index.md +50 -0
  25. package/dist/template/docs/ru/installation-telemetry.md +125 -0
  26. package/dist/template/docs/ru/npm-installer.md +71 -0
  27. package/dist/template/docs/ru/operations-guide.md +317 -0
  28. package/dist/template/docs/ru/ota-client-lifecycle.md +167 -0
  29. package/dist/template/docs/ru/ota-emergency-recovery.md +108 -0
  30. package/dist/template/docs/ru/ota-update-policy.md +67 -0
  31. package/dist/template/docs/ru/publishing-npm-installer.md +49 -0
  32. package/dist/template/docs/ru/supabase-setup.md +120 -0
  33. package/dist/template/docs/uk/admin-ui.md +29 -0
  34. package/dist/template/docs/uk/device-targeting.md +59 -0
  35. package/dist/template/docs/uk/doctor.md +98 -0
  36. package/dist/template/docs/uk/expo-app-setup.md +497 -0
  37. package/dist/template/docs/uk/getting-started.md +391 -0
  38. package/dist/template/docs/uk/index.md +50 -0
  39. package/dist/template/docs/uk/installation-telemetry.md +125 -0
  40. package/dist/template/docs/uk/npm-installer.md +71 -0
  41. package/dist/template/docs/uk/operations-guide.md +317 -0
  42. package/dist/template/docs/uk/ota-client-lifecycle.md +167 -0
  43. package/dist/template/docs/uk/ota-emergency-recovery.md +108 -0
  44. package/dist/template/docs/uk/ota-update-policy.md +67 -0
  45. package/dist/template/docs/uk/publishing-npm-installer.md +49 -0
  46. package/dist/template/docs/uk/supabase-setup.md +120 -0
  47. package/dist/template/package.json +1 -0
  48. package/dist/template/src/client/devices/analytics.tsx +21 -8
  49. package/dist/template/src/client/devices/device-name.tsx +3 -1
  50. package/dist/template/src/client/devices/registry.tsx +38 -19
  51. package/dist/template/src/client/devices/version-adoption-chart.tsx +22 -10
  52. package/dist/template/src/client/distribution-control.tsx +27 -14
  53. package/dist/template/src/client/guard-action-combobox.test.ts +1 -1
  54. package/dist/template/src/client/guard-action-combobox.tsx +16 -10
  55. package/dist/template/src/client/i18n/en.json +203 -1
  56. package/dist/template/src/client/i18n/language-switching.test.tsx +224 -0
  57. package/dist/template/src/client/i18n/messages.test.ts +102 -19
  58. package/dist/template/src/client/i18n/messages.ts +31 -16
  59. package/dist/template/src/client/i18n/provider.tsx +6 -3
  60. package/dist/template/src/client/i18n/ru.json +488 -0
  61. package/dist/template/src/client/i18n/uk.json +488 -0
  62. package/dist/template/src/client/i18n/use-formatters.ts +5 -0
  63. package/dist/template/src/client/update-audience-editor.tsx +18 -11
  64. package/dist/template/src/client/update-policy-editor.tsx +64 -39
  65. package/dist/template-manifest.json +224 -69
  66. package/package.json +1 -1
@@ -0,0 +1,224 @@
1
+ // @vitest-environment jsdom
2
+ import { act } from "react";
3
+ import { createRoot, type Root } from "react-dom/client";
4
+ import { renderToString } from "react-dom/server";
5
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
6
+ import { LanguageSwitcher } from "@/components/admin/language-switcher";
7
+ import EmergencyRedirectsPage from "@/app/updates/emergency-redirects/page";
8
+ import UpdatePolicyEditor from "@/src/client/update-policy-editor";
9
+ import LoginPage from "@/app/login/page";
10
+ import { LocaleProvider, useI18n } from "./provider";
11
+ import { useFormatters } from "./use-formatters";
12
+ import { LOCALE_COOKIE, resolveLocale, type Locale } from "./messages";
13
+
14
+ const api = vi.hoisted(() => ({
15
+ getEmergencyRedirects: vi.fn(),
16
+ getAdminSession: vi.fn(),
17
+ createEmergencyRedirect: vi.fn(),
18
+ updateEmergencyRedirect: vi.fn(),
19
+ deleteEmergencyRedirect: vi.fn(),
20
+ getUpdatePolicy: vi.fn(),
21
+ getGuardActions: vi.fn(),
22
+ putUpdatePolicy: vi.fn(),
23
+ createGuardAction: vi.fn(),
24
+ deleteGuardAction: vi.fn(),
25
+ adminLogin: vi.fn(),
26
+ }));
27
+ vi.mock("@/src/client/admin-api", () => api);
28
+ vi.mock("next/navigation", () => ({
29
+ useRouter: () => ({ replace: vi.fn() }),
30
+ }));
31
+
32
+ let root: Root;
33
+ let container: HTMLDivElement;
34
+ const redirect = {
35
+ id: "rule-1",
36
+ name: "Мой канал / $&",
37
+ enabled: true,
38
+ embeddedUpdateId: "11111111-1111-4111-8111-111111111111",
39
+ runtimeVersion: "1.0.0",
40
+ platform: "android",
41
+ fromChannel: "development",
42
+ toChannel: "production",
43
+ targetMode: "pinned",
44
+ expectedUpdateId: "22222222-2222-4222-8222-222222222222",
45
+ };
46
+ beforeEach(() => {
47
+ Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
48
+ container = document.createElement("div");
49
+ document.body.append(container);
50
+ root = createRoot(container);
51
+ document.cookie = `${LOCALE_COOKIE}=; Path=/; Max-Age=0`;
52
+ api.getEmergencyRedirects.mockResolvedValue({ items: [redirect] });
53
+ api.getAdminSession.mockResolvedValue({ role: "admin" });
54
+ api.updateEmergencyRedirect.mockResolvedValue(redirect);
55
+ api.getUpdatePolicy.mockResolvedValue({
56
+ delivery: "manual",
57
+ guard: null,
58
+ policyVersion: 1,
59
+ editable: true,
60
+ publishedAt: null,
61
+ });
62
+ api.getGuardActions.mockResolvedValue({ items: [], canWrite: true });
63
+ vi.spyOn(window, "scrollTo").mockImplementation(() => {});
64
+ });
65
+ afterEach(async () => {
66
+ await act(async () => root.unmount());
67
+ container.remove();
68
+ vi.restoreAllMocks();
69
+ vi.clearAllMocks();
70
+ });
71
+ async function switchTo(locale: Locale) {
72
+ const select = container.querySelector<HTMLSelectElement>(
73
+ "select[aria-label]",
74
+ )!;
75
+ await act(async () => {
76
+ select.value = locale;
77
+ select.dispatchEvent(new Event("change", { bubbles: true }));
78
+ });
79
+ }
80
+ async function click(text: string) {
81
+ const button = [...container.querySelectorAll("button")].find(
82
+ (b) => b.textContent === text,
83
+ );
84
+ expect(button, text).toBeDefined();
85
+ await act(async () => button!.click());
86
+ }
87
+ function Formats() {
88
+ const { formatLocale } = useI18n();
89
+ const { number, fullDate } = useFormatters();
90
+ return (
91
+ <output data-locale={formatLocale}>
92
+ {number(12345.6)} | {fullDate("2026-10-26T12:34:00Z")}
93
+ </output>
94
+ );
95
+ }
96
+
97
+ describe("language switching", () => {
98
+ it("switches recovery forms, status, notices and accessibility labels without losing data", async () => {
99
+ await act(async () =>
100
+ root.render(
101
+ <LocaleProvider initialLocale="en">
102
+ <LanguageSwitcher />
103
+ <EmergencyRedirectsPage />
104
+ </LocaleProvider>,
105
+ ),
106
+ );
107
+ expect(container.textContent).toContain("Emergency redirects");
108
+ await click("Edit");
109
+ await switchTo("ru");
110
+ expect(container.textContent).toContain("Исходный канал");
111
+ expect(container.textContent).toContain("Закреплённое обновление");
112
+ expect(
113
+ container
114
+ .querySelector("select[aria-label]")
115
+ ?.getAttribute("aria-label"),
116
+ ).toBe("Язык интерфейса");
117
+ expect(
118
+ [...container.querySelectorAll("input")].map((i) => i.value),
119
+ ).toContain(redirect.name);
120
+ await click("Сохранить изменения");
121
+ expect(api.updateEmergencyRedirect).toHaveBeenCalledWith(
122
+ "rule-1",
123
+ expect.objectContaining({
124
+ name: redirect.name,
125
+ fromChannel: "development",
126
+ toChannel: "production",
127
+ targetMode: "pinned",
128
+ }),
129
+ );
130
+ expect(container.textContent).toContain("Аварийный маршрут обновлён");
131
+ await switchTo("uk");
132
+ expect(container.textContent).toContain("Аварійний маршрут оновлено");
133
+ expect(container.textContent).toContain("Початковий канал");
134
+ expect(container.textContent).toContain("Увімкнено");
135
+ expect(container.textContent).toContain(redirect.name);
136
+ expect(document.documentElement.lang).toBe("uk");
137
+ expect(document.cookie).toContain(`${LOCALE_COOKIE}=uk`);
138
+ expect(api.getEmergencyRedirects).toHaveBeenCalledTimes(2);
139
+ await switchTo("en");
140
+ expect(container.textContent).toContain("Emergency redirect updated");
141
+ });
142
+
143
+ it("localizes recovery validation errors and read-only actions", async () => {
144
+ api.getAdminSession.mockResolvedValue({ role: "viewer" });
145
+ await act(async () =>
146
+ root.render(
147
+ <LocaleProvider initialLocale="uk">
148
+ <LanguageSwitcher />
149
+ <EmergencyRedirectsPage />
150
+ </LocaleProvider>,
151
+ ),
152
+ );
153
+ expect(container.textContent).toContain("Лише читання");
154
+ expect(container.querySelector("form")).toBeNull();
155
+ expect(container.textContent).not.toContain("Read only");
156
+ });
157
+
158
+ it("renders login and formatting in the saved locale on remount and on the server", async () => {
159
+ await act(async () =>
160
+ root.render(
161
+ <LocaleProvider initialLocale="en">
162
+ <LanguageSwitcher />
163
+ <Formats />
164
+ </LocaleProvider>,
165
+ ),
166
+ );
167
+ await switchTo("uk");
168
+ expect(container.querySelector("output")?.dataset.locale).toBe("uk-UA");
169
+ expect(container.querySelector("output")?.textContent).toContain(
170
+ new Intl.NumberFormat("uk-UA").format(12345.6),
171
+ );
172
+ expect(container.querySelector("output")?.textContent).toContain(
173
+ new Intl.DateTimeFormat("uk-UA", {
174
+ dateStyle: "medium",
175
+ timeStyle: "short",
176
+ timeZone: "UTC",
177
+ }).format(new Date("2026-10-26T12:34:00Z")),
178
+ );
179
+ const saved = resolveLocale(document.cookie.split("=")[1]);
180
+ await act(async () =>
181
+ root.render(
182
+ <LocaleProvider key="reload" initialLocale={saved}>
183
+ <LoginPage />
184
+ </LocaleProvider>,
185
+ ),
186
+ );
187
+ expect(container.textContent).toContain("Увійти");
188
+ expect(container.querySelector("select")?.value).toBe("uk");
189
+ const html = renderToString(
190
+ <LocaleProvider initialLocale={saved}>
191
+ <LanguageSwitcher />
192
+ </LocaleProvider>,
193
+ );
194
+ expect(html).toContain('aria-label="Мова інтерфейсу"');
195
+ expect(html).toContain('value="uk" lang="uk" selected=""');
196
+ });
197
+
198
+ it("switches the policy editor, catalog, and errors in place", async () => {
199
+ await act(async () =>
200
+ root.render(
201
+ <LocaleProvider initialLocale="ru">
202
+ <LanguageSwitcher />
203
+ <UpdatePolicyEditor encodedKey="test" onSaved={async () => {}} />
204
+ </LocaleProvider>,
205
+ ),
206
+ );
207
+ expect(container.textContent).toContain("Политика обновления");
208
+ expect(container.textContent).toContain("Каталог действий");
209
+ await switchTo("uk");
210
+ expect(container.textContent).toContain("Політика оновлення");
211
+ expect(container.textContent).toContain("Додати дію до каталогу");
212
+ api.putUpdatePolicy.mockRejectedValue(
213
+ new Error("Update policy is immutable after publication."),
214
+ );
215
+ await click("Зберегти політику");
216
+ expect(container.textContent).toContain(
217
+ "Політику оновлення не можна змінити після публікації.",
218
+ );
219
+ await switchTo("ru");
220
+ expect(container.textContent).toContain(
221
+ "Политику обновления нельзя изменить после публикации.",
222
+ );
223
+ });
224
+ });
@@ -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