1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-09 16:42:48 +00:00
Files
go-discord-bot/client/app/util.ts
2018-08-23 00:24:01 -05:00

18 lines
330 B
TypeScript

const getScreenWidth = () => {
const w = window,
d = document,
e = d.documentElement,
g = d.getElementsByTagName('body')[0];
return w.innerWidth || e.clientWidth || g.clientWidth;
};
const isMobileScreen = () => {
return getScreenWidth() < 768;
};
export const Util = {
getScreenWidth,
isMobileScreen,
};