import React, { Fragment } from "react";
import { useSelector } from "react-redux";
import { SceneStore } from "~store/scene/reducer";
import { GameStore } from "~store/state";
import MapEditor from "~game/scenes/MapEditor";

export default function Game() {
  const scene = useSelector<GameStore, SceneStore>((state) => state.scene);
  switch (scene.type) {
    case "MapEditor":
      return <MapEditor />;
    default:
      // Bad case, should have something to show just in case!
      return <Fragment></Fragment>;
  }
}
