From 472fb5b04eeb8bfea11378d8c60f76e8ea8eda4b Mon Sep 17 00:00:00 2001 From: saptadeep12 Date: Mon, 7 Sep 2026 18:12:07 +0530 Subject: [PATCH] Added key to toggle activity sidebar --- devboard/client/src/pages/Dashboard.jsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/devboard/client/src/pages/Dashboard.jsx b/devboard/client/src/pages/Dashboard.jsx index 33d8430..10c9a30 100644 --- a/devboard/client/src/pages/Dashboard.jsx +++ b/devboard/client/src/pages/Dashboard.jsx @@ -61,6 +61,17 @@ const Dashboard = () => { document.title = "Dashboard — DevBoard"; }, []); + useEffect(() => { + const handler = (e) => { + if (e.target.matches('input, textarea')) return; + if (e.key === 's' || e.key === 'S') { + setShowActivity(v => !v); + } + }; + window.addEventListener('keydown', handler); + return () => window.removeEventListener('keydown', handler); + }, []); + useEffect(() => { const handleBeforeInstallPrompt = (event) => { event.preventDefault();