(READ ONLY) Margin is an open annotation layer for the internet. Powered by the AT Protocol. margin.at
extension web atproto comments
99
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix

+3 -3
+3 -3
web/src/views/core/Settings.tsx
··· 1 1 import React, { useEffect, useState } from "react"; 2 2 import { useStore } from "@nanostores/react"; 3 3 import { useTranslation } from "react-i18next"; 4 - import i18n from "../../i18n"; 5 4 import { languages } from "virtual:i18n-languages"; 6 5 import { $user, logout } from "../../store/auth"; 7 6 import { $theme, setTheme, type Theme } from "../../store/theme"; ··· 85 84 const [addingLabeler, setAddingLabeler] = useState(false); 86 85 const [isShortcutModalOpen, setIsShortcutModalOpen] = useState(false); 87 86 const preferences = useStore($preferences); 88 - const currentLanguage = i18n.resolvedLanguage ?? i18n.language ?? "en"; 87 + const { i18n: i18nInstance } = useTranslation(); 88 + const currentLanguage = i18nInstance.resolvedLanguage ?? i18nInstance.language ?? "en"; 89 89 90 90 useEffect(() => { 91 91 const loadKeys = async () => { ··· 259 259 {languages.map((lang) => ( 260 260 <button 261 261 key={lang.code} 262 - onClick={() => i18n.changeLanguage(lang.code)} 262 + onClick={() => i18nInstance.changeLanguage(lang.code)} 263 263 className={`px-4 py-2 rounded-xl text-sm font-medium border-2 transition-all ${ 264 264 currentLanguage.startsWith(lang.code) 265 265 ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300"