sprinklers3/client/pages/DevicePage.tsx

27 lines
636 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-09-02 02:57:55 -06:00
class DevicePage extends React.Component<
RouteComponentProps<{ deviceId: string }>
> {
render() {
const {
match: {
params: { deviceId }
}
} = this.props;
const devId = Number(deviceId);
return (
<Item.Group divided>
<DeviceView deviceId={devId} inList={false} />
</Item.Group>
);
}
2017-09-10 12:30:23 -06:00
}
2018-08-11 20:11:31 +03:00
export default withRouter(observer(DevicePage));