diff --git a/src/App.tsx b/src/App.tsx index 58ba6a2..87bef0e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -104,7 +104,6 @@ export function App() { window.onkeydown = onKeyDown; }, []); - const [highlighted, setHighlighted] = useState( commands.map(() => false)); @@ -117,7 +116,8 @@ export function App() { const onSelectExample = (e: React.SyntheticEvent) => { // @ts-ignore - if (e.target.value) { + if (e.target.value >= 0) { + // @ts-ignore // @ts-ignore pushHistory(_ => examples[e.target.value][1]); } @@ -135,13 +135,13 @@ export function App() { {descr} ) } - + + { + examples.map(([name], i) => { + return ; + }) + }