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

@ -1,33 +0,0 @@
import React from "react";
import { PreviousScene } from "../scene/types";
import { t } from "../i18n";
interface StoredScenesListProps {
scenes: PreviousScene[];
currentId?: string;
onChange: (selectedId: string, k?: string) => {};
}
export function StoredScenesList({
scenes,
currentId,
onChange,
}: StoredScenesListProps) {
return (
<select
className="stored-ids-select"
onChange={({ currentTarget }) => {
const scene = scenes[(currentTarget.value as unknown) as number];
onChange(scene.id, scene.k);
}}
value={currentId}
title={t("buttons.previouslyLoadedScenes")}
>
{scenes.map((scene, i) => (
<option key={i} value={i}>
id={scene.id}
</option>
))}
</select>
);
}