From 2fdc7a0ff08955c99f467245e7b5e7a635540faa Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 26 Aug 2018 19:19:45 +0200 Subject: [PATCH] Fixed shape types not properly defined as shapes but as plane objects --- src/short-urls/reducers/shortUrlCreationResult.js | 4 ++-- src/short-urls/reducers/shortUrlVisits.js | 4 ++-- src/short-urls/reducers/shortUrlsListParams.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/short-urls/reducers/shortUrlCreationResult.js b/src/short-urls/reducers/shortUrlCreationResult.js index a70f32a4..ccb4f01c 100644 --- a/src/short-urls/reducers/shortUrlCreationResult.js +++ b/src/short-urls/reducers/shortUrlCreationResult.js @@ -9,13 +9,13 @@ const CREATE_SHORT_URL = 'shlink/createShortUrl/CREATE_SHORT_URL'; const RESET_CREATE_SHORT_URL = 'shlink/createShortUrl/RESET_CREATE_SHORT_URL'; /* eslint-enable padding-line-between-statements, newline-after-var */ -export const createShortUrlResultType = { +export const createShortUrlResultType = PropTypes.shape({ result: PropTypes.shape({ shortUrl: PropTypes.string, }), saving: PropTypes.bool, error: PropTypes.bool, -}; +}); const defaultState = { result: null, diff --git a/src/short-urls/reducers/shortUrlVisits.js b/src/short-urls/reducers/shortUrlVisits.js index b03ee9f7..65db1162 100644 --- a/src/short-urls/reducers/shortUrlVisits.js +++ b/src/short-urls/reducers/shortUrlVisits.js @@ -9,12 +9,12 @@ const GET_SHORT_URL_VISITS_ERROR = 'shlink/shortUrlVisits/GET_SHORT_URL_VISITS_E const GET_SHORT_URL_VISITS = 'shlink/shortUrlVisits/GET_SHORT_URL_VISITS'; /* eslint-enable padding-line-between-statements, newline-after-var */ -export const shortUrlVisitsType = { +export const shortUrlVisitsType = PropTypes.shape({ shortUrl: shortUrlType, visits: PropTypes.array, loading: PropTypes.bool, error: PropTypes.bool, -}; +}); const initialState = { shortUrl: {}, diff --git a/src/short-urls/reducers/shortUrlsListParams.js b/src/short-urls/reducers/shortUrlsListParams.js index 7e5cfd6e..ef8de0b6 100644 --- a/src/short-urls/reducers/shortUrlsListParams.js +++ b/src/short-urls/reducers/shortUrlsListParams.js @@ -3,11 +3,11 @@ import { LIST_SHORT_URLS } from './shortUrlsList'; export const RESET_SHORT_URL_PARAMS = 'shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS'; -export const shortUrlsListParamsType = { +export const shortUrlsListParamsType = PropTypes.shape({ page: PropTypes.string, tags: PropTypes.arrayOf(PropTypes.string), searchTerm: PropTypes.string, -}; +}); const defaultState = { page: '1' };