Closed Sparkier closed 9 months ago
Do we need another lib for this? ChatGPT says we can use something like this:
function isMobileDevice() {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}
I guess that's a philosophical question. This library is pretty tiny and does a bit more of a check than what ChatGPT told you but we could definitely just copy this part:
Problem then is that we have to maintain this ourselves in case this list ever changes. I'd probably lean towards not doing optimizations like this rn but fine for me either way.
SGTM!
Description
fix ZEN-271