From ebbadf94dd4b23b9ceabd402ed0886c4cd8c6062 Mon Sep 17 00:00:00 2001
From: physcik <mynameisgennadiy@vk.com>
Date: Sat, 11 Apr 2026 17:12:18 +0500
Subject: Localization persistance

---
 front/src/Emelents/IndexElement.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'front/src/Emelents/IndexElement.tsx')

diff --git a/front/src/Emelents/IndexElement.tsx b/front/src/Emelents/IndexElement.tsx
index 9914e89..2209fe1 100644
--- a/front/src/Emelents/IndexElement.tsx
+++ b/front/src/Emelents/IndexElement.tsx
@@ -1,11 +1,13 @@
-import { useState } from "react";
-import { GetString } from "../Locales/Locales";
+import { useContext, useState } from "react";
+import { LanguageContext } from "../Locales/Context";
+import { GetLocalizedString } from "../Locales/Locales";
 
 function IndexElement() {
-    const [lang, setLang] = useState('en');
+    var lang = useContext(LanguageContext);
+
     return (
         <div>
-            <h1> {GetString("index", lang)} </h1>
+            <h1> {GetLocalizedString("index", lang)} </h1>
         </div>
     );
 }
-- 
cgit v1.3

