diff --git a/src/pages/Config.tsx b/src/pages/Config.tsx index 1181852b..2762176d 100644 --- a/src/pages/Config.tsx +++ b/src/pages/Config.tsx @@ -36,7 +36,7 @@ import { setFavDayTheme, setFavNightTheme, setSelectedEndpoint, - setTwemoji, + setUseTwemoji, useRequest, useTwemoji, } from '~/signals' @@ -250,78 +250,69 @@ const ConfigForm = () => { const ConfigForXd = () => { const [t, { locale }] = useI18n() - const autoSwitchThemeSubChild = () => ( - -
- {t('favDayTheme')} + return ( +
+
+
+ {t('autoSwitchTheme')} + + setAutoSwitchTheme(e.target.checked)} + /> +
- -
-
- {t('favNightTheme')} + +
+
+ {t('favDayTheme')} + + +
- +
+ {t('favNightTheme')} + + +
+
+
- - ) - const checkboxList = [ - { - label: t('autoSwitchTheme'), - value: autoSwitchTheme, - onChange: (value: boolean) => setAutoSwitchTheme(value), - subChild: autoSwitchThemeSubChild, - }, - { - label: t('useTwemoji'), - value: useTwemoji, - onChange: setTwemoji, - }, - ] - - return ( -
- - {(checkbox) => ( - <> -
- {checkbox.label} +
+ {t('useTwemoji')} - { - checkbox.onChange(e.target.checked) - }} - /> -
- {checkbox.subChild?.()} - - )} - + setUseTwemoji(e.target.checked)} + /> +