From 365a0b28323d330eae7a80131e809895df2523ac Mon Sep 17 00:00:00 2001 From: nimbleghost <132819643+nimbleghost@users.noreply.github.com> Date: Wed, 28 Jun 2023 23:38:57 +0200 Subject: [PATCH] Fix preferences warnings --- web/src/components/Pref.jsx | 10 +++++----- web/src/components/Preferences.jsx | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/components/Pref.jsx b/web/src/components/Pref.jsx index 5e64c41f..4da17381 100644 --- a/web/src/components/Pref.jsx +++ b/web/src/components/Pref.jsx @@ -11,14 +11,14 @@ const PrefRow = styled("div")` display: flex; flex-direction: row; - > :first-child { + > div:first-of-type { flex: 1 0 40%; display: flex; flex-direction: column; justify-content: ${(props) => (props.alignTop ? "normal" : "center")}; } - > :last-child { + > div:last-of-type { flex: 1 0 calc(60% - 50px); display: flex; flex-direction: column; @@ -29,12 +29,12 @@ const PrefRow = styled("div")` flex-direction: column; gap: 10px; - > :first-child, - > :last-child { + > :div:first-of-type, + > :div:last-of-type { flex: unset; } - > :last-child { + > div:last-of-type { .MuiFormControl-root { margin: 0; } diff --git a/web/src/components/Preferences.jsx b/web/src/components/Preferences.jsx index a24ccd96..a93032ce 100644 --- a/web/src/components/Preferences.jsx +++ b/web/src/components/Preferences.jsx @@ -241,7 +241,7 @@ const DeleteAfter = () => { const Theme = () => { const { t } = useTranslation(); const labelId = "prefTheme"; - const enabled = useLiveQuery(async () => prefs.theme()); + const theme = useLiveQuery(async () => prefs.theme()); const handleChange = async (ev) => { await prefs.setTheme(ev.target.value); }; @@ -249,7 +249,7 @@ const Theme = () => { return ( - {t("prefs_appearance_theme_system")} {t("prefs_appearance_theme_dark")} {t("prefs_appearance_theme_light")}