1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-09 08:32:48 +00:00
Files
go-discord-bot/client/app/util.ts
2018-08-19 18:31:08 -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() < 520;
};
export const Util = {
getScreenWidth,
isMobileScreen,
};