sprinklers3/client/pages/DevicePage.tsx

21 lines
648 B
TypeScript
Raw Normal View History

2017-09-10 12:30:23 -06:00
import { observer } from "mobx-react";
import * as React from "react";
2017-09-10 20:28:23 -06:00
import { Item } from "semantic-ui-react";
2017-09-10 12:30:23 -06:00
2018-08-07 21:21:26 +03:00
import DeviceView from "@client/components/DeviceView";
import { RouteComponentProps, withRouter } from "react-router";
2017-09-10 12:30:23 -06:00
2018-08-11 20:11:31 +03:00
class DevicePage extends React.Component<RouteComponentProps<{ deviceId: string }>> {
2017-09-10 12:30:23 -06:00
render() {
2018-08-11 20:11:31 +03:00
const { match: { params: { deviceId } } } = this.props;
2018-08-12 11:55:15 +03:00
const devId = Number(deviceId);
2017-09-10 20:28:23 -06:00
return (
<Item.Group divided>
2018-08-12 11:55:15 +03:00
<DeviceView deviceId={devId} inList={false} />
2017-09-10 20:28:23 -06:00
</Item.Group>
);
2017-09-10 12:30:23 -06:00
}
}
2018-08-11 20:11:31 +03:00
export default withRouter(observer(DevicePage));