Mirror of https://github.com/roostorg/osprey
github.com/roostorg/osprey
1import * as React from 'react';
2import { Route, Switch } from 'react-router-dom';
3
4import EntityPanel from '../entities/EntityPanel';
5import QueryInput, { QueryInputProps } from './QueryInput';
6import QueryListPanel from './QueryListPanel';
7
8import { Routes } from '../../Constants';
9import 'highlight.js/styles/atelier-cave-light.css';
10
11interface QueryPanelProps {}
12
13const QueryPanel = ({ ...props }: QueryPanelProps & QueryInputProps) => {
14 return (
15 <>
16 <QueryInput {...props} />
17 <Switch>
18 <Route path={Routes.ENTITY}>
19 <EntityPanel />
20 </Route>
21 <Route>
22 <QueryListPanel />
23 </Route>
24 </Switch>
25 </>
26 );
27};
28
29export default QueryPanel;