From 982a31ef5109d306cafd434ea4f9ab2a2c52ae40 Mon Sep 17 00:00:00 2001 From: Aminejv Date: Fri, 23 Sep 2022 17:37:41 +0100 Subject: [PATCH] feat(utilities): add isUsingMac utility --- common/utilities.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/utilities.js b/common/utilities.js index c1214d19..7c68c09a 100644 --- a/common/utilities.js +++ b/common/utilities.js @@ -214,3 +214,10 @@ export const cloneElementWithJsx = (element, config, ...children) => { ...children ); }; + +export const isUsingMac = () => { + if (typeof window !== "undefined") { + return window.navigator.appVersion.indexOf("Mac") != -1; + } + return false; +};