MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / onclick

Function onclick

src/sidebarApps/index.js:160–167  ·  view source on GitHub ↗

* Handles click on sidebar apps * @param {MouseEvent} e

(e)

Source from the content-addressed store, hash-verified

158 * @param {MouseEvent} e
159 */
160function onclick(e) {
161 const target = e.target;
162 const { action, id } = target.dataset;
163
164 if (action !== "sidebar-app") return;
165
166 setActiveApp(id);
167}
168
169/**
170 * Activates the given sidebar app and deactivates all others.

Callers

nothing calls this directly

Calls 1

setActiveAppFunction · 0.85

Tested by

no test coverage detected