diff --git a/src/App.tsx b/src/App.tsx index 47e88cf..5099f26 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -310,6 +310,11 @@ function App() { const [amountInput, setAmountInput] = useState("50"); const [selectedPreset, setSelectedPreset] = useState(50); + const [isTouchDevice, setIsTouchDevice] = useState(false); + useEffect(() => { + setIsTouchDevice('ontouchstart' in window || navigator.maxTouchPoints > 0); + }, []); + // Handle global shortcuts const handleGlobalKeyDown = useCallback((event: KeyboardEvent) => { // Navigation to My APIs (e.g. g then a) @@ -774,13 +779,24 @@ function App() { isActive ? "link-nav active" : "link-nav"}>Theme Playground isActive ? "link-nav active" : "link-nav"}>Status isActive ? "link-nav active" : "link-nav"}>Documentation + {!isTouchDevice && ( + + )} - setIsShortcutsModalOpen(false)} - /> + {!isTouchDevice && ( + setIsShortcutsModalOpen(false)} + /> + )} diff --git a/src/data/mockApis.ts b/src/data/mockApis.ts index 959fc30..49a5330 100644 --- a/src/data/mockApis.ts +++ b/src/data/mockApis.ts @@ -7,6 +7,8 @@ export type Review = { verified: boolean; }; + + export type APIItem = { id: string; name: string;