MCPcopy
hub / github.com/usememos/memos / AuthFooter

Function AuthFooter

web/src/components/AuthFooter.tsx:13–33  ·  view source on GitHub ↗
({ className }: Props)

Source from the content-addressed store, hash-verified

11}
12
13const AuthFooter = ({ className }: Props) => {
14 const { i18n: i18nInstance } = useTranslation();
15 const currentLocale = i18nInstance.language as Locale;
16 const [currentTheme, setCurrentTheme] = useState(getInitialTheme());
17
18 const handleLocaleChange = (locale: Locale) => {
19 loadLocale(locale);
20 };
21
22 const handleThemeChange = (theme: string) => {
23 loadTheme(theme);
24 setCurrentTheme(theme as Theme);
25 };
26
27 return (
28 <div className={cn("mt-4 flex flex-row items-center justify-center w-full gap-2", className)}>
29 <LocaleSelect value={currentLocale} onChange={handleLocaleChange} />
30 <ThemeSelect value={currentTheme} onValueChange={handleThemeChange} />
31 </div>
32 );
33};
34
35export default AuthFooter;

Callers

nothing calls this directly

Calls 2

getInitialThemeFunction · 0.90
cnFunction · 0.90

Tested by

no test coverage detected