Skip to content
Snippets Groups Projects
Commit a570eeaf authored by KDSBrowne's avatar KDSBrowne
Browse files

use matchMedia() to determin if we open the Userlist on meeting join

parent a8603022
No related branches found
No related tags found
No related merge requests found
......@@ -27,15 +27,9 @@ export function joinRouteHandler(nextState, replace, callback) {
Auth.set(meetingID, internalUserID, authToken, logoutUrl, sessionToken);
const MAX_PHONE_VIEWPORT = 480;
const hasPhoneDimensions = (
(window.screen.width <= MAX_PHONE_VIEWPORT && window.screen.width < window.screen.height)
||
(window.screen.height <= MAX_PHONE_VIEWPORT && window.screen.width > window.screen.height)
);
const path = (('ontouchstart' in window || navigator.msMaxTouchPoints) && hasPhoneDimensions)
? '/' : '/users';
let path = '/';
const smallSide = window.matchMedia('(orientation: portrait)') ? 'width' : 'height';
if (!matchMedia(`only screen and (max-${smallSide}: 480px)`).matches) path += 'users';
replace({ pathname: path });
callback();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment