diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2023-05-28 13:48:21 +0530 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2023-05-28 13:48:21 +0530 |
commit | 99ca310c73024b51fed1f3077375eed7827f2c20 (patch) | |
tree | 2bd15986f448129a2291acba90ccc6bf68a233e0 /src/components/ui/toggle/index.tsx | |
parent | Disable in-app auto-updates for portable windows installation (fixes #1088) (... (diff) | |
download | ferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.tar.gz ferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.tar.zst ferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.zip |
Fix issues reported by sonarqube linter
Diffstat (limited to 'src/components/ui/toggle/index.tsx')
-rw-r--r-- | src/components/ui/toggle/index.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/ui/toggle/index.tsx b/src/components/ui/toggle/index.tsx index 828941886..48f68943b 100644 --- a/src/components/ui/toggle/index.tsx +++ b/src/components/ui/toggle/index.tsx | |||
@@ -16,10 +16,11 @@ interface IProps | |||
16 | className?: string; | 16 | className?: string; |
17 | } | 17 | } |
18 | 18 | ||
19 | const buttonTransition: string = | 19 | const buttonTransition: string = window?.matchMedia( |
20 | window && window.matchMedia('(prefers-reduced-motion: no-preference)') | 20 | '(prefers-reduced-motion: no-preference)', |
21 | ? 'all .5s' | 21 | ) |
22 | : 'none'; | 22 | ? 'all .5s' |
23 | : 'none'; | ||
23 | 24 | ||
24 | const styles = (theme: Theme) => ({ | 25 | const styles = (theme: Theme) => ({ |
25 | toggle: { | 26 | toggle: { |