actions: added typed useDispatch() hook

This commit is contained in:
David Lechner
2021-12-27 18:01:51 -06:00
parent 8d26f768bf
commit 54ec447061
12 changed files with 18 additions and 12 deletions
+1 -1
View File
@@ -12,8 +12,8 @@ import tomorrowNightEightiesTheme from 'monaco-themes/themes/Tomorrow-Night-Eigh
import xcodeTheme from 'monaco-themes/themes/Xcode_default.json';
import React, { useEffect, useRef } from 'react';
import MonacoEditor, { monaco } from 'react-monaco-editor';
import { useDispatch } from 'react-redux';
import { IDisposable } from 'xterm';
import { useDispatch } from '../actions';
import { compile } from '../mpy/actions';
import { useSelector } from '../reducers';
import { toggleBoolean } from '../settings/actions';
+1 -1
View File
@@ -2,7 +2,7 @@
// Copyright (c) 2020-2021 The Pybricks Authors
import React from 'react';
import { useDispatch } from 'react-redux';
import { useDispatch } from '../actions';
import * as notificationActions from '../notifications/actions';
import { useSelector } from '../reducers';
import OpenFileButton, { OpenFileButtonProps } from '../toolbar/OpenFileButton';
+1 -1
View File
@@ -2,7 +2,7 @@
// Copyright (c) 2020-2021 The Pybricks Authors
import React from 'react';
import { useDispatch } from 'react-redux';
import { useDispatch } from '../actions';
import * as editorActions from '../editor/actions';
import { useSelector } from '../reducers';
import ActionButton, { ActionButtonProps } from '../toolbar/ActionButton';