small fix
This commit is contained in:
parent
5964510036
commit
18e28fe8b0
1 changed files with 9 additions and 9 deletions
18
src/App.tsx
18
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<HTMLSelectElement>) => {
|
||||
// @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}
|
||||
</span>)
|
||||
}
|
||||
<select onClick={onSelectExample}>
|
||||
<option>load example...</option>
|
||||
{
|
||||
examples.map(([name], i) => {
|
||||
return <option key={i} value={i}>{name}</option>;
|
||||
})
|
||||
}
|
||||
<select onChange={onSelectExample} value={-1}>
|
||||
<option value={-1}>load example...</option>
|
||||
{
|
||||
examples.map(([name], i) => {
|
||||
return <option key={i} value={i}>{name}</option>;
|
||||
})
|
||||
}
|
||||
</select>
|
||||
<button className="factoryReset" onClick={factoryReset}>
|
||||
FACTORY RESET
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue