|
|
@ -1,6 +1,6 @@ |
|
|
|
import { observer } from "mobx-react"; |
|
|
|
import { observer } from "mobx-react"; |
|
|
|
import * as React from "react"; |
|
|
|
import * as React from "react"; |
|
|
|
import { Item, Button } from "semantic-ui-react"; |
|
|
|
import { Button, Item } from "semantic-ui-react"; |
|
|
|
|
|
|
|
|
|
|
|
import { DeviceView } from "@client/components"; |
|
|
|
import { DeviceView } from "@client/components"; |
|
|
|
import { AppState, injectState } from "@client/state"; |
|
|
|
import { AppState, injectState } from "@client/state"; |
|
|
@ -12,7 +12,7 @@ class DevicesPage extends React.Component<{ appState: AppState }> { |
|
|
|
|
|
|
|
|
|
|
|
render() { |
|
|
|
render() { |
|
|
|
const { appState } = this.props; |
|
|
|
const { appState } = this.props; |
|
|
|
const { userData } = appState.userStore; |
|
|
|
const userData = appState.userStore.getUserData(); |
|
|
|
let deviceNodes: React.ReactNode; |
|
|
|
let deviceNodes: React.ReactNode; |
|
|
|
if (!userData) { |
|
|
|
if (!userData) { |
|
|
|
deviceNodes = <span>Not logged in</span>; |
|
|
|
deviceNodes = <span>Not logged in</span>; |
|
|
@ -25,7 +25,7 @@ class DevicesPage extends React.Component<{ appState: AppState }> { |
|
|
|
} |
|
|
|
} |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<React.Fragment> |
|
|
|
<React.Fragment> |
|
|
|
<h1 className="devices-header">Devices <Button icon="refresh" onClick={this.refreshDevices}></Button></h1> |
|
|
|
<h1 className="devices-header">Devices <Button icon="refresh" onClick={this.refreshDevices} /></h1> |
|
|
|
<Item.Group>{deviceNodes}</Item.Group> |
|
|
|
<Item.Group>{deviceNodes}</Item.Group> |
|
|
|
</React.Fragment> |
|
|
|
</React.Fragment> |
|
|
|
); |
|
|
|
); |
|
|
|