mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
chore: add ga for most actions (#4829)
This commit is contained in:
parent
e940aeb1a3
commit
f242721f3b
40 changed files with 221 additions and 93 deletions
|
@ -19,6 +19,7 @@ import LibraryMenuItems from "./LibraryMenuItems";
|
|||
import { EVENT } from "../constants";
|
||||
import { KEYS } from "../keys";
|
||||
import { arrayToMap } from "../utils";
|
||||
import { trackEvent } from "../analytics";
|
||||
|
||||
const useOnClickOutside = (
|
||||
ref: RefObject<HTMLElement>,
|
||||
|
@ -157,6 +158,7 @@ export const LibraryMenu = ({
|
|||
|
||||
const addToLibrary = useCallback(
|
||||
async (elements: LibraryItem["elements"]) => {
|
||||
trackEvent("element", "addToLibrary", "ui");
|
||||
if (elements.some((element) => element.type === "image")) {
|
||||
return setAppState({
|
||||
errorMessage: "Support for adding images to the library coming soon!",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue