Skip to content

Commit

Permalink
feat: added lazy loading for mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
HasanYahya101 authored Jun 30, 2024
1 parent 34f5c2c commit a79ca14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Apology from './components/component/apology';
const isDesktop = () => {
const userAgent = window.navigator.userAgent.toLowerCase();
const isMobile = /mobile|android|iphone|ipad|tablet|touch|samsung|fridge/i.test(userAgent);
const isSmallScreen = window.innerWidth <= 1024; // Adjust the screen width threshold as needed
const isSmallScreen = window.innerWidth <= 1024;
return !isMobile && !isSmallScreen;
};

Expand Down

0 comments on commit a79ca14

Please sign in to comment.