Remove previously loaded scenes (#734)

As mentioned in #724, the current implementation is suboptimal. Let's remove it until we come back with a better design.

Fixes #724
This commit is contained in:
Christopher Chedeau 2020-02-08 15:05:38 -08:00 committed by GitHub
parent 8d64ec8153
commit 935a7f58a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 3 additions and 122 deletions

View file

@ -31,7 +31,6 @@ import {
hasStroke,
hasText,
exportCanvas,
loadedScenes,
loadScene,
calculateScrollCenter,
loadFromBlob,
@ -96,7 +95,6 @@ import { ExportDialog } from "./components/ExportDialog";
import { LanguageList } from "./components/LanguageList";
import { Point } from "roughjs/bin/geometry";
import { t, languages, setLanguage, getLanguage } from "./i18n";
import { StoredScenesList } from "./components/StoredScenesList";
import { HintViewer } from "./components/HintViewer";
import { copyToAppClipboard, getClipboardContent } from "./clipboard";
@ -318,22 +316,6 @@ const LayerUI = React.memo(
);
}
function renderIdsDropdown() {
const scenes = loadedScenes();
if (scenes.length === 0) {
return;
}
return (
<StoredScenesList
scenes={scenes}
currentId={appState.selectedId}
onChange={async (id, k) =>
actionManager.updater(await loadScene(id, k))
}
/>
);
}
return (
<>
<FixedSideContainer side="top">
@ -400,7 +382,6 @@ const LayerUI = React.memo(
languages={languages}
currentLanguage={language}
/>
{renderIdsDropdown()}
{appState.scrolledOutside && (
<button
className="scroll-back-to-content"