Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: show projects only on desktop devices #643

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Conversation

Sparkier
Copy link
Member

Description

fix ZEN-271

@Sparkier Sparkier requested a review from cabreraalex January 10, 2024 15:15
@Sparkier Sparkier self-assigned this Jan 10, 2024
Copy link

linear bot commented Jan 10, 2024

@cabreraalex
Copy link
Member

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);
}

@Sparkier
Copy link
Member Author

Sparkier commented Jan 11, 2024

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:

https://github.com/rozek/svelte-device-info/blob/517210b3ec8caa65606f066572cfb85a03841728/src/svelte-device-info.ts#L10-L15

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.

@cabreraalex
Copy link
Member

SGTM!

@cabreraalex cabreraalex merged commit 6dba02f into main Jan 11, 2024
7 checks passed
@cabreraalex cabreraalex deleted the ab-project-mobile branch January 11, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants