12 lines
209 B
TypeScript
12 lines
209 B
TypeScript
import { screens } from '@/config/ui';
|
|
|
|
export function getDevice() {
|
|
if (typeof window === 'undefined') return null;
|
|
|
|
const isMobile = window.innerWidth < screens.tablet;
|
|
|
|
return {
|
|
isMobile,
|
|
};
|
|
}
|