import React from "react";
import FindPrompt from "./FindPrompt";
import CommandPrompt from "./CommandPrompt";
import InfoMessage from "./InfoMessage";
import ErrorMessage from "./ErrorMessage";
import * as consoleActions from "../../console/actions/console";
import ColorSchemeProvider from "./ColorSchemeProvider";
import AppContext from "./AppContext";
const Console: React.FC = () => {
const { state, dispatch } = React.useContext(AppContext);
React.useEffect(() => {
dispatch(consoleActions.setColorScheme());
}, []);
const ele = (() => {
switch (state.mode) {
case "command":
return ;
case "find":
return ;
case "info":
return {state.messageText};
case "error":
return {state.messageText};
default:
return null;
}
})();
return (
{ele}
);
};
export default Console;