From 08a4bf2f6b4111ecbfc3eb9501062ba00901615b Mon Sep 17 00:00:00 2001 From: insanity Date: Wed, 23 Aug 2017 19:41:26 +0900 Subject: [PATCH] test --- src/ts/@overflow/history/react/components/HistoryList.tsx | 5 +++-- src/ts/@overflow/history/redux/reducer/read_all_by_probe.ts | 6 +++--- src/ts/@overflow/history/redux/state/ReadAllByProbe.ts | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ts/@overflow/history/react/components/HistoryList.tsx b/src/ts/@overflow/history/react/components/HistoryList.tsx index 710b6b7..a38b799 100644 --- a/src/ts/@overflow/history/react/components/HistoryList.tsx +++ b/src/ts/@overflow/history/react/components/HistoryList.tsx @@ -3,10 +3,11 @@ import { Table, Button, Header, Container, Menu, Icon } from 'semantic-ui-react' import { ListContainer } from '@overflow/commons/react/component/ListContainer'; import Probe from '@overflow/probe/api/model/Probe'; import History from '@overflow/history/api/model/History'; +import Page from '@overflow/commons/api/model/Page'; export interface StateProps { probeId: string; - histories: any; + histories: Page; } export interface DispatchProps { @@ -66,7 +67,7 @@ export class HistoryList extends React.Component { this.props.onReadAllByProbe(probe, String(p), String(this.countPerPage)); } - public renderPagination = (pageObj: any): (JSX.Element | JSX.Element[]) => { + public renderPagination = (pageObj: Page): (JSX.Element | JSX.Element[]) => { if (pageObj === undefined) { return null; } diff --git a/src/ts/@overflow/history/redux/reducer/read_all_by_probe.ts b/src/ts/@overflow/history/redux/reducer/read_all_by_probe.ts index b4a45f6..00c29d6 100644 --- a/src/ts/@overflow/history/redux/reducer/read_all_by_probe.ts +++ b/src/ts/@overflow/history/redux/reducer/read_all_by_probe.ts @@ -2,17 +2,17 @@ import Action from '@overflow/commons/redux/Action'; import { ReducersMapObject } from 'redux'; import Probe from '@overflow/probe/api/model/Probe'; import History from '../../api/model/History'; - +import Page from '@overflow/commons/api/model/Page'; import * as ReadAllByProbeActionTypes from '../action/read_all_by_probe'; import ReadAllByProbeState, { defaultState as ReadAllByProbeDefaultState } from '../state/ReadAllByProbe'; const reducer: ReducersMapObject = { [ReadAllByProbeActionTypes.REQUEST_SUCCESS]: - (state: ReadAllByProbeState = ReadAllByProbeDefaultState, action: Action): + (state: ReadAllByProbeState = ReadAllByProbeDefaultState, action: Action): ReadAllByProbeState => { return { ...state, - historyPage: action.payload, + historyPage: action.payload, }; }, [ReadAllByProbeActionTypes.REQUEST_FAILURE]: diff --git a/src/ts/@overflow/history/redux/state/ReadAllByProbe.ts b/src/ts/@overflow/history/redux/state/ReadAllByProbe.ts index 87a2f80..c24fad9 100644 --- a/src/ts/@overflow/history/redux/state/ReadAllByProbe.ts +++ b/src/ts/@overflow/history/redux/state/ReadAllByProbe.ts @@ -1,7 +1,8 @@ import History from '../../api/model/History'; +import Page from '@overflow/commons/api/model/Page'; export interface State { - readonly historyPage?: object; + readonly historyPage?: Page; readonly error?: Error; }