Detect mac vs windows

This commit is contained in:
Eric Rosenbaum 2018-08-16 13:52:51 -04:00
parent 287bc8405a
commit 0c5de6cea1

View file

@ -10,8 +10,15 @@ class ExtensionLanding extends React.Component {
'onSetOS'
]);
let detectedOS = OS_ENUM.WINDOWS;
if (window.navigator && window.navigator.platform) {
if (window.navigator.platform === 'MacIntel') {
detectedOS = OS_ENUM.MACOS;
}
}
this.state = {
OS: OS_ENUM.WINDOWS
OS: detectedOS
};
}