From: Greg Hurrell Date: Mon, 3 Aug 2015 22:41:54 +0000 (-0700) Subject: Extract component X-Git-Url: https://git.wincent.com/hextrapolate.git/commitdiff_plain/b8110ed664ce0d0fcacf394cb50149bf9b369323 Extract component Keeps things a little cleaner. --- diff --git a/src/App.js b/src/App.js index 088634a..2dadf8f 100644 --- a/src/App.js +++ b/src/App.js @@ -12,7 +12,7 @@ import React from 'react'; import type Value from './Field.react'; import Field from './Field.react'; import Label from './Label.react'; -import convert from './convert'; +import Size from './Size.react'; import './App.css'; @@ -30,21 +30,11 @@ export default class App extends React.Component { render() { const {value} = this.state; - const bits = value ? convert( - value.value, - value.base, - 16 - ).length * 8 : 0; return (

- Hextrapolate - — - {' '} - {bits / 8 } byte{bits / 8 === 1 ? '' : 's'}, - {' '} - {bits} bits + Hextrapolate —