|
@@ -1,13 +1,13 @@
|
|
|
import { detectLang } from '../messages/index.js';
|
|
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() {
|
|
export function LangSwitch() {
|
|
|
const lang = detectLang();
|
|
const lang = detectLang();
|
|
|
- const { label, href } = OTHER[lang];
|
|
|
|
|
|
|
+ const { label, href } = TO[lang];
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<a
|
|
<a
|