import * as React from 'react'; interface IMainMenuProps { newEditor: () => void loadEditor: (files: FileList | null) => void } enum WindowState { MAIN, LOAD, } export const MainMenu: React.FC = (props) => { const [windowState, setWindowState] = React.useState(WindowState.MAIN); switch (windowState) { case WindowState.LOAD: return (
); default: return (
); } };