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,
|
||||
}) => {
|
||||
const [displayShortcut, setDisplayShortcut] = useState(shortcut);
|
||||
const [isMac, setIsMac] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
// OS detection should run only on the client-side
|
||||
const isMacUser = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
||||
setIsMac(isMacUser);
|
||||
|
||||
if (isMacUser) {
|
||||
if (macosShortcut) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue