Closed seanlodhammar closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
pear-landing-page | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Oct 15, 2024 8:23am |
pear-landing-page-main | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Oct 15, 2024 8:23am |
Someone is attempting to deploy a commit to the PearAI Team on Vercel.
A member of the Team first needs to authorize it.
Description
Adds a download button to the main header, that uses new
getOS
util function to detect the user's operating system. Works on both Firefox and Chromium browsers in my own testing.Should note that
getOS
uses an experimental functionnavigator.userAgentData
property to accurately detect the architecture that a user is running on. This is necessary for detecting whether a user is using a Silicon or Intel Mac CPU.This property is only available on Chromium browsers at the moment, so if it is unavailable because the user is using a different browser (e.g. firefox), the
navigator.userAgent
string is parsed, and the function tries to get platform and architecture data from it. On Mac, even if the user is on the Silicon chip, it still shows up as "Intel" in the user agent string, so instead, this code checks the MacOS version the user is on, and if they're above version 13, then it downloads the Silicon version, otherwise it downloads the Intel version.If on Linux, the download button sends the user to the Linux blog post.
Tested On
Windows
Linux
MacOS
Related Issue
273
Changes Made
getOS
utility function addedScreenshots
Checklist
yarn build
and build is successful