Skip to content

Commit

Permalink
fix: added comment about avaliability and tablet-variable
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 committed Apr 10, 2024
1 parent b454bf4 commit e5325ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import Bowser from "bowser";

const deviceInfo = Bowser.parse(window.navigator.userAgent);

// platform type, can be either "desktop", "tablet" or "mobile"
export const isMobile = deviceInfo.platform.type === "mobile";

export const isTablet = deviceInfo.platform.type === "tablet";

export const isDesktop = deviceInfo.platform.type === "desktop";

0 comments on commit e5325ed

Please sign in to comment.