瀏覽代碼

fix: language button shows current language (en/ru), taps to switch

Co-Authored-By: Claude <noreply@anthropic.com>
Oleg Panashchenko 2 周之前
父節點
當前提交
2fb4f586d9
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      client/src/components/LangSwitch.tsx

+ 4 - 4
client/src/components/LangSwitch.tsx

@@ -1,13 +1,13 @@
 import { detectLang } from '../messages/index.js';
 
-const OTHER: Record<string, { label: string; href: string }> = {
-  en: { label: 'ru', href: '/ru' },
-  ru: { label: 'en', href: '/' },
+const TO: Record<string, { label: string; href: string }> = {
+  en: { label: 'en', href: '/ru' },
+  ru: { label: 'ru', href: '/' },
 };
 
 export function LangSwitch() {
   const lang = detectLang();
-  const { label, href } = OTHER[lang];
+  const { label, href } = TO[lang];
 
   return (
     <a