We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5859c5b commit 96ae328Copy full SHA for 96ae328
src/lib/MediaQueryContext.tsx
@@ -1,8 +1,8 @@
1
import React, { useEffect, useState } from 'react';
2
import type { Logger } from './SendbirdState';
3
4
-const DEFAULT_MOBILE = false;
5
-// const DEFAULT_MOBILE = '768px';
+const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
+const DEFAULT_MOBILE = isMobile;
6
const MOBILE_CLASSNAME = 'sendbird--mobile-mode';
7
8
const MediaQueryContext = React.createContext({
0 commit comments