You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vscode-sshfs/webview/src/router.tsx

25 lines
696 B

import ConfigEditor from './ConfigEditor';
import ConfigLocator from './ConfigLocator';
import NewConfig from './NewConfig';
import { connect, State } from './redux';
import Startscreen from './Startscreen';
interface StateProps {
view: State['view']['view'];
}
function Router(props: StateProps) {
switch (props.view) {
case 'configeditor':
return <ConfigEditor />;
case 'configlocator':
return <ConfigLocator />;
case 'newconfig':
return <NewConfig />;
case 'startscreen':
default:
return <Startscreen />;
}
}
export default connect(Router)<StateProps>(state => ({ view: state.view.view }));