-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/feat/argent-one-button-connector' into beta
- Loading branch information
Showing
9 changed files
with
43 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export const isMobileDevice = () => { | ||
// Primary method: User Agent + Touch support check | ||
const userAgent = navigator.userAgent.toLowerCase() | ||
const isMobileUA = | ||
/android|webos|iphone|ipad|ipod|blackberry|windows phone/.test(userAgent) | ||
const hasTouchSupport = | ||
"ontouchstart" in window || navigator.maxTouchPoints > 0 | ||
|
||
// Backup method: Screen size | ||
const isSmallScreen = window.innerWidth <= 768 | ||
|
||
// Combine checks: Must match user agent AND (touch support OR small screen) | ||
return isMobileUA && (hasTouchSupport || isSmallScreen) | ||
} | ||
|
||
export const isSafari = () => | ||
typeof window !== "undefined" | ||
? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) | ||
: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters