diff --git a/src/ts/@overflow/sensor/react/SensorList.tsx b/src/ts/@overflow/sensor/react/SensorList.tsx index 7f22fe5..195037d 100644 --- a/src/ts/@overflow/sensor/react/SensorList.tsx +++ b/src/ts/@overflow/sensor/react/SensorList.tsx @@ -33,9 +33,12 @@ export function mapDispatchToProps(dispatch: Dispatch): SensorListDispatchP onReadAllByDomain: (domain: Domain) => { dispatch(ReadAllByDomainActions.request(domain)); }, - onSensorSelect: (id: number) => { + onSelectSensor: (id: number) => { dispatch(routerPush('/sensor/' + String(id))); }, + onAddSensor: (target: Target) => { + dispatch(routerPush('/sensor/' + String(11))); + }, }; } diff --git a/src/ts/@overflow/sensor/react/components/SensorList.tsx b/src/ts/@overflow/sensor/react/components/SensorList.tsx index d3de27b..973f70e 100644 --- a/src/ts/@overflow/sensor/react/components/SensorList.tsx +++ b/src/ts/@overflow/sensor/react/components/SensorList.tsx @@ -16,7 +16,8 @@ export interface DispatchProps { onReadAllByTarget?(target: Target): void; onReadAllByProbe?(probe: Probe): void; onReadAllByDomain?(domain: Domain): void; - onSensorSelect?(id: number): void; + onSelectSensor?(id: number): void; + onAddSensor?(target: Target): void; } export type SensorListProps = StateProps & DispatchProps; @@ -93,7 +94,7 @@ export class SensorList extends React.Component