import React from 'react'; import $ from 'jquery'; import {Button} from 'react-bootstrap'; import EmbarkJS from 'Embark/EmbarkJS'; import ProposalForm from './proposal-form'; class Proposal extends React.Component { constructor(props) { super(props); this.state = { url: null, title: null, description: null }; } componentDidMount(){ __embarkContext.execWhenReady(() => { EmbarkJS.Storage.get(this.props.data.description) .then((content) => { let jsonObj = JSON.parse(content); this.setState({ url: jsonObj.url, title: jsonObj.title, description: jsonObj.description }) }) .catch((err) => { if(err){ // TODO handle error console.log("Storage get Error => " + err.message); } }); }); } render(){ return (

{ this.state.title }

{ this.state.description }

{ this.state.url }
); } } export default Proposal;