diff --git a/components/detail.js b/components/detail.js index 13c1ddd..2a87187 100644 --- a/components/detail.js +++ b/components/detail.js @@ -15,19 +15,23 @@ import { } from "react-vr"; import text from "../text"; import { splitText } from "../utils"; - - +import { type Speaker } from "../query"; +import Profile from "./profile"; type State = { currentCount: number, intervalId: number, textArray: Array, - start: boolean + start: boolean, + leftPartOfWord: string, + rightPartOfWord: string, + highlightedLetter: string }; type Props = { - backPressed: () => void, - description: string + backPressed: () => void, + description: string, + speaker: Speaker }; export default class VRTextReader extends React.Component { @@ -42,7 +46,7 @@ export default class VRTextReader extends React.Component { this._timer = this._timer.bind(this); //$FlowFixMe this._start = this._start.bind(this); - + //$FlowFixMe this._pauze - this._pauze.bind(this); this.state = { @@ -118,6 +122,7 @@ export default class VRTextReader extends React.Component { render() { return ( + ); } + } -AppRegistry.registerComponent("VRTextReader", () => VRTextReader); \ No newline at end of file +AppRegistry.registerComponent("VRTextReader", () => VRTextReader); diff --git a/components/profile.js b/components/profile.js new file mode 100644 index 0000000..d70ba62 --- /dev/null +++ b/components/profile.js @@ -0,0 +1,53 @@ +//@flow + +import React, { Component } from "react"; +import { + AppRegistry, + asset, + Pano, + Text, + View, + VrButton, + Image + //$FlowFixMe +} from "react-vr"; + +import { type Speaker } from "../query"; +const defaultURL = "https://facebook.github.io/react/img/logo_og.png"; + + +type Props = { + speaker: Speaker +} + + +export default class ViewColoredBoxesWithText extends Component { + props: Props; + + render() { + const { avatarUrl, name } = this.props.speaker; + + return ( + + + + + + + {name} + + + + ); + } +} diff --git a/components/router.js b/components/router.js index fd72f41..ec39591 100644 --- a/components/router.js +++ b/components/router.js @@ -67,6 +67,7 @@ export default class Router extends React.Component { content = ( { this.setState({ state: {