MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / useIsMac

Function useIsMac

packages/web/src/hooks/useIsMac.ts:5–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { useState, useEffect } from 'react';
4
5export function useIsMac(): boolean {
6 const [isMac, setIsMac] = useState(false);
7
8 useEffect(() => {
9 setIsMac(/Mac OS X/.test(navigator.userAgent));
10 }, []);
11
12 return isMac;
13}

Callers 2

MentionComponentFunction · 0.90
KeyboardShortcutHintFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected