mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Track current version (#2731)
This commit is contained in:
parent
3a130cb102
commit
001880ba88
4 changed files with 44 additions and 13 deletions
|
@ -6,6 +6,7 @@ import React, {
|
|||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import { trackEvent } from "../analytics";
|
||||
import { getDefaultAppState } from "../appState";
|
||||
import { ExcalidrawImperativeAPI } from "../components/App";
|
||||
import { ErrorDialog } from "../components/ErrorDialog";
|
||||
|
@ -22,7 +23,12 @@ import Excalidraw, {
|
|||
languages,
|
||||
} from "../packages/excalidraw/index";
|
||||
import { AppState, ExcalidrawAPIRefValue } from "../types";
|
||||
import { debounce, ResolvablePromise, resolvablePromise } from "../utils";
|
||||
import {
|
||||
debounce,
|
||||
getVersion,
|
||||
ResolvablePromise,
|
||||
resolvablePromise,
|
||||
} from "../utils";
|
||||
import { SAVE_TO_LOCAL_STORAGE_TIMEOUT } from "./app_constants";
|
||||
import CollabWrapper, { CollabAPI } from "./collab/CollabWrapper";
|
||||
import { LanguageList } from "./components/LanguageList";
|
||||
|
@ -223,6 +229,7 @@ function ExcalidrawWrapper(props: { collab: CollabAPI }) {
|
|||
const { collab } = props;
|
||||
|
||||
useEffect(() => {
|
||||
trackEvent("load", "version", getVersion());
|
||||
excalidrawRef.current!.readyPromise.then((excalidrawApi) => {
|
||||
initializeScene({
|
||||
resetScene: excalidrawApi.resetScene,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue