Browse Source

Change Device type

master
Loëck Vézien 7 years ago
parent
commit
16aac7c82d
No known key found for this signature in database GPG Key ID: CBCDCE384E853AC4
  1. 2
      package.json
  2. 2
      src/actions/devices.js
  3. 2
      src/components/Home.js
  4. 2
      src/components/TopBar.js
  5. 2
      src/types/common.js
  6. 6
      yarn.lock

2
package.json

@ -69,7 +69,7 @@
"eslint-plugin-react": "^7.5.1",
"flow-bin": "^0.63.1",
"flow-typed": "^2.2.3",
"prettier": "^1.9.2",
"prettier": "^1.10.1",
"react-hot-loader": "^4.0.0-beta.12"
}
}

2
src/actions/devices.js

@ -8,7 +8,7 @@ import { getDevices, getCurrentDevice } from 'reducers/devices'
import type { Device, Devices } from 'types/common'
export type deviceChooseType = (?Device) => { type: string, payload: ?Device }
export type deviceChooseType = Device => { type: string, payload: Device }
export const deviceChoose: deviceChooseType = payload => ({
type: 'DEVICE_CHOOSE',
payload,

2
src/components/Home.js

@ -15,7 +15,7 @@ const mapStateToProps: MapStateToProps<*, *, *> = state => ({
})
type Props = {
currentDevice: Device | null,
currentDevice: Device,
}
class Home extends PureComponent<Props> {

2
src/components/TopBar.js

@ -25,7 +25,7 @@ const mapDispatchToProps: MapDispatchToProps<*, *, *> = {
type Props = {
devices: Devices,
currentDevice: Device | null,
currentDevice: Device,
deviceChoose: deviceChooseType,
}

2
src/types/common.js

@ -4,7 +4,7 @@ export type Device = {
vendorId: string,
productId: string,
path: string,
}
} | null
export type Devices = Array<Device>

6
yarn.lock

@ -5487,9 +5487,9 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@^1.9.2:
version "1.9.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827"
prettier@^1.10.1:
version "1.10.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.10.1.tgz#01423fea6957ea23618d37d339ef0e7f7c967fc6"
pretty-bytes@^1.0.2:
version "1.0.4"

Loading…
Cancel
Save