mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Merge branch 'master' into cleanipp
This commit is contained in:
commit
e4a0254c47
12 changed files with 189 additions and 338 deletions
|
@ -11,7 +11,7 @@ import { getDefaultAppState } from "../appState";
|
|||
import { ExcalidrawImperativeAPI } from "../components/App";
|
||||
import { ErrorDialog } from "../components/ErrorDialog";
|
||||
import { TopErrorBoundary } from "../components/TopErrorBoundary";
|
||||
import { APP_NAME, EVENT, TITLE_TIMEOUT } from "../constants";
|
||||
import { APP_NAME, EVENT, TITLE_TIMEOUT, VERSION_TIMEOUT } from "../constants";
|
||||
import { ImportedDataState } from "../data/types";
|
||||
import {
|
||||
ExcalidrawElement,
|
||||
|
@ -229,18 +229,10 @@ const ExcalidrawWrapper = (props: { collab: CollabAPI }) => {
|
|||
const { collab } = props;
|
||||
|
||||
useEffect(() => {
|
||||
// delayed by 15 sec so that the app has a time to load the latest SW
|
||||
// Delayed so that the app has a time to load the latest SW
|
||||
setTimeout(() => {
|
||||
const version = getVersion();
|
||||
const loggedVersion = window.localStorage.getItem(
|
||||
"excalidraw-lastLoggedVersion",
|
||||
);
|
||||
// prevent logging on multiple visits
|
||||
if (version && version !== loggedVersion) {
|
||||
window.localStorage.setItem("excalidraw-lastLoggedVersion", version);
|
||||
trackEvent("load", "version", version);
|
||||
}
|
||||
}, 15000);
|
||||
trackEvent("load", "version", getVersion());
|
||||
}, VERSION_TIMEOUT);
|
||||
|
||||
excalidrawRef.current!.readyPromise.then((excalidrawApi) => {
|
||||
initializeScene({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue