mirror of
https://github.com/JuLi0n21/pwa-player.git
synced 2026-04-19 23:40:05 +00:00
getting ready for desktop version
This commit is contained in:
15
frontend/src/script/utils.ts
Normal file
15
frontend/src/script/utils.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export const isMobile = () => {
|
||||
return window.innerWidth < 640;
|
||||
};
|
||||
|
||||
export const isTablet = () => {
|
||||
return window.innerWidth >= 640 && window.innerWidth < 1024;
|
||||
};
|
||||
|
||||
export const isPc = () => {
|
||||
return window.innerWidth >= 1024 && window.innerWidth <= 1980;
|
||||
};
|
||||
|
||||
export const matchesBreakpoint = (min, max = Infinity) => {
|
||||
return window.innerWidth >= min && window.innerWidth <= max;
|
||||
};
|
||||
Reference in New Issue
Block a user