mirror of
https://github.com/zen-browser/docs.git
synced 2025-07-07 17:05:34 +02:00
Removed unnecessary state for isMac
This commit is contained in:
parent
9a4765c23b
commit
61e12c4efa
1 changed files with 0 additions and 2 deletions
|
@ -14,12 +14,10 @@ const KeyboardShortcut: React.FC<KeyboardShortcutProps> = ({
|
||||||
className,
|
className,
|
||||||
}) => {
|
}) => {
|
||||||
const [displayShortcut, setDisplayShortcut] = useState(shortcut);
|
const [displayShortcut, setDisplayShortcut] = useState(shortcut);
|
||||||
const [isMac, setIsMac] = useState(false);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// OS detection should run only on the client-side
|
// OS detection should run only on the client-side
|
||||||
const isMacUser = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
const isMacUser = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
||||||
setIsMac(isMacUser);
|
|
||||||
|
|
||||||
if (isMacUser) {
|
if (isMacUser) {
|
||||||
if (macosShortcut) {
|
if (macosShortcut) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue