Migrated settings module to TS

This commit is contained in:
Alejandro Celaya
2020-08-24 17:32:20 +02:00
parent 0b4a348969
commit fefa4e7848
7 changed files with 40 additions and 40 deletions

View File

@@ -1,4 +1,4 @@
import { handleActions } from 'redux-actions';
import { Action, handleActions } from 'redux-actions';
import PropTypes from 'prop-types';
import { Dispatch } from 'redux';
import { ShlinkApiClientBuilder, ShlinkMercureInfo } from '../../utils/services/types';
@@ -52,7 +52,7 @@ export const loadMercureInfo = (buildShlinkApiClient: ShlinkApiClientBuilder) =>
try {
const payload = await mercureInfo();
dispatch({ type: GET_MERCURE_INFO, payload });
dispatch<Action<ShlinkMercureInfo>>({ type: GET_MERCURE_INFO, payload });
} catch (e) {
dispatch({ type: GET_MERCURE_INFO_ERROR });
}