changed props
This commit is contained in:
parent
1f3ad4b588
commit
437f124d2c
|
@ -1,8 +1,8 @@
|
|||
import { connect, Dispatch } from 'react-redux';
|
||||
import {
|
||||
SensorList,
|
||||
Props as SensorListProps,
|
||||
State as SensorListState,
|
||||
StateProps as SensorListStateProps,
|
||||
DispatchProps as SensorListDispatchProps,
|
||||
} from './components/SensorList';
|
||||
import State from '../redux/state/ReadAllByTarget';
|
||||
|
||||
|
@ -10,19 +10,12 @@ import * as ReadAllByTargetActions from '../redux/action/read_all_by_target';
|
|||
import Target from '@overflow/target/api/model/Target';
|
||||
import Sensor from '@overflow/sensor/api/model/Sensor';
|
||||
|
||||
export function mapStateToProps(state: any): SensorListProps {
|
||||
export function mapStateToProps(state: any): SensorListStateProps {
|
||||
return {
|
||||
};
|
||||
}
|
||||
|
||||
// const mapDispatchToProps = (dispatch: Dispatch<any>) => ({
|
||||
// onReadAllByTarget: (target: Target) => {
|
||||
// dispatch(ReadAllByTargetActions.request(target));
|
||||
// },
|
||||
// });
|
||||
|
||||
|
||||
export function mapDispatchToProps(dispatch: Dispatch<any>): SensorListProps {
|
||||
export function mapDispatchToProps(dispatch: Dispatch<any>): SensorListDispatchProps {
|
||||
return {
|
||||
onReadAllByTarget: (target: Target) => {
|
||||
dispatch(ReadAllByTargetActions.request(target));
|
||||
|
|
|
@ -6,11 +6,16 @@ import Probe from '@overflow/probe/api/model/Probe';
|
|||
import Sensor from '@overflow/sensor/api/model/Sensor';
|
||||
import Target from '@overflow/target/api/model/Target';
|
||||
|
||||
export interface Props {
|
||||
export interface StateProps {
|
||||
target?: Target;
|
||||
}
|
||||
|
||||
export interface DispatchProps {
|
||||
onReadAllByTarget?(target: Target): void;
|
||||
}
|
||||
|
||||
export type Props = StateProps & DispatchProps;
|
||||
|
||||
export interface State {
|
||||
isDetail: boolean;
|
||||
selected: Sensor;
|
||||
|
|
Loading…
Reference in New Issue
Block a user