From f1ac8cac32cd77b5f6d57c50a374783753daa971 Mon Sep 17 00:00:00 2001 From: dwelle Date: Thu, 12 Mar 2020 19:40:04 +0100 Subject: [PATCH] remove unused selectedId --- src/data/index.ts | 4 +--- src/data/types.ts | 1 - src/types.ts | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/data/index.ts b/src/data/index.ts index aea93bd0..9ec26e0f 100644 --- a/src/data/index.ts +++ b/src/data/index.ts @@ -341,12 +341,10 @@ export async function exportCanvas( export async function loadScene(id: string | null, privateKey?: string) { let data; - let selectedId; if (id != null) { // the private key is used to decrypt the content from the server, take // extra care not to leak it data = await importFromBackend(id, privateKey); - selectedId = id; window.history.replaceState({}, "Excalidraw", window.location.origin); } else { data = restoreFromLocalStorage(); @@ -354,6 +352,6 @@ export async function loadScene(id: string | null, privateKey?: string) { return { elements: data.elements, - appState: data.appState && { ...data.appState, selectedId }, + appState: data.appState && { ...data.appState }, }; } diff --git a/src/data/types.ts b/src/data/types.ts index daa85c6f..7d0166cc 100644 --- a/src/data/types.ts +++ b/src/data/types.ts @@ -7,5 +7,4 @@ export interface DataState { source?: string; elements: readonly ExcalidrawElement[]; appState: AppState | null; - selectedId?: number; } diff --git a/src/types.ts b/src/types.ts index 457d806f..9c81150c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -28,7 +28,6 @@ export type AppState = { cursorY: number; scrolledOutside: boolean; name: string; - selectedId?: string; isCollaborating: boolean; isResizing: boolean; zoom: number;