Skip to content

Commit d38e3c8

Browse files
committed
chore: add mobile detection
1 parent af39654 commit d38e3c8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export function isMobileDevice(): boolean {
2+
if (typeof window === 'undefined') return false;
3+
4+
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ||
5+
(window.innerWidth <= 768);
6+
}
7+
8+
export function getDeepLinkUrl(qrData: string): string {
9+
return qrData;
10+
}

0 commit comments

Comments
 (0)