Fixed coding styles and ensured linting command applies to ts and tsx files

This commit is contained in:
Alejandro Celaya
2020-09-02 20:27:50 +02:00
parent f9c57ca659
commit 4083592212
7 changed files with 23 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
import { Action, Dispatch } from 'redux';
import { buildActionCreator, buildReducer } from '../../utils/helpers/redux';
import { ProblemDetailsError} from '../../utils/services/types';
import { ProblemDetailsError } from '../../utils/services/types';
import { GetState } from '../../container/types';
import { ShlinkApiClientBuilder } from '../../utils/services/ShlinkApiClientBuilder';

View File

@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import { Modal, ModalBody } from 'reactstrap';
import { Map, TileLayer, Marker, Popup, MapProps } from 'react-leaflet';
import { Map, TileLayer, Marker, Popup } from 'react-leaflet';
import { prop } from 'ramda';
import { CityStats } from '../types';
import './MapModal.scss';
@@ -19,7 +19,7 @@ const OpenStreetMapTile: FC = () => (
/>
);
const calculateMapProps = (locations: CityStats[]): Partial<MapProps> => {
const calculateMapProps = (locations: CityStats[]): any => {
if (locations.length === 0) {
return {};
}

View File

@@ -77,7 +77,7 @@ export const getShortUrlVisits = (buildShlinkApiClient: ShlinkApiClientBuilder)
query: { domain?: OptionalString } = {},
) => async (dispatch: Dispatch, getState: GetState) => {
const { getShortUrlVisits } = buildShlinkApiClient(getState);
const visitsLoader = (page: number, itemsPerPage: number) => getShortUrlVisits(
const visitsLoader = async (page: number, itemsPerPage: number) => getShortUrlVisits(
shortCode,
{ ...query, page, itemsPerPage },
);

View File

@@ -68,7 +68,10 @@ export const getTagVisits = (buildShlinkApiClient: ShlinkApiClientBuilder) => (t
getState: GetState,
) => {
const { getTagVisits } = buildShlinkApiClient(getState);
const visitsLoader = (page: number, itemsPerPage: number) => getTagVisits(tag, { ...query, page, itemsPerPage });
const visitsLoader = async (page: number, itemsPerPage: number) => getTagVisits(
tag,
{ ...query, page, itemsPerPage },
);
const extraFinishActionData: Partial<TagVisitsAction> = { tag };
const actionMap = {
start: GET_TAG_VISITS_START,