Web: Common/Components: added checkIsSSR to utils, applied changes
This commit is contained in:
parent
95e97ac8ed
commit
46ca8055f2
@ -402,3 +402,7 @@ export function getOAuthToken(tokenGetterWin) {
|
||||
export function getLoginLink(token, code) {
|
||||
return combineUrl(proxyURL, `/login.ashx?p=${token}&code=${code}`);
|
||||
}
|
||||
|
||||
export function checkIsSSR() {
|
||||
return typeof window === "undefined";
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
import { checkIsSSR } from "@docspace/common/utils";
|
||||
|
||||
export const size = {
|
||||
mobile: 375,
|
||||
hugeMobile: 428,
|
||||
@ -35,7 +37,9 @@ export const isTablet = () => {
|
||||
};
|
||||
|
||||
export const isDesktop = () => {
|
||||
if (!checkIsSSR()) {
|
||||
return window.innerWidth >= size.desktop;
|
||||
} else return false;
|
||||
};
|
||||
|
||||
export const isTouchDevice = !!(
|
||||
|
Loading…
Reference in New Issue
Block a user