about summary refs log tree commit diff
path: root/src/platform/detection.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/detection.ts')
-rw-r--r--src/platform/detection.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/platform/detection.ts b/src/platform/detection.ts
index 150fc1fe3..de4dfc07b 100644
--- a/src/platform/detection.ts
+++ b/src/platform/detection.ts
@@ -1,5 +1,6 @@
 import {Platform} from 'react-native'
 import {getLocales} from 'expo-localization'
+
 import {dedupArray} from 'lib/functions'
 
 export const isIOS = Platform.OS === 'ios'
@@ -18,3 +19,8 @@ export const deviceLocales = dedupArray(
     .map?.(locale => locale.languageCode)
     .filter(code => typeof code === 'string'),
 ) as string[]
+
+export const prefersReducedMotion =
+  isWeb &&
+  // @ts-ignore we know window exists -prf
+  !global.window.matchMedia('(prefers-reduced-motion: no-preference)')?.matches