File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
apps/site/hooks/react-client Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import type {
77 Bitness ,
88 OperatingSystem ,
99} from '#site/types/userAgent' ;
10- import { getHighEntropyValues , detectOS } from '#site/util/userAgent' ;
10+ import { detectOS , getHighEntropyValues } from '#site/util/userAgent' ;
1111
1212type UserOSState = {
1313 os : OperatingSystem | 'LOADING' ;
@@ -42,10 +42,12 @@ const useDetectOS = () => {
4242 ( {
4343 // If there is no getHighEntropyValues API on the Browser or it failed to resolve
4444 // we attempt to fallback to what the User Agent indicates
45- bitness = uaIndicates64 ? '64' : '32' ,
45+ bitness = os === 'MAC' || uaIndicates64 ? '64' : '32' ,
4646 // we assume that MacOS has moved to arm64 by default now
47- architecture = os === 'MAC' ? 'arm64 ' : 'x86' ,
47+ architecture = os === 'MAC' ? 'arm ' : 'x86' ,
4848 } ) => {
49+ console . log ( { bitness, architecture } ) ;
50+
4951 setUserOSState ( current => ( {
5052 ...current ,
5153 bitness : bitness as Bitness ,
You can’t perform that action at this time.
0 commit comments