import './Activity.scss' import React, { Component } from 'react' import TimeTree from './Timeline/Timeline' import { connect } from 'react-redux' import PropTypes from 'prop-types' // import Breadcrumb from '../../../components/Breadcrumb/Breadcrumb' import { Button } from 'antd' import { getMockUrl } from '../../../reducer/modules/news.js' @connect( state => { return { uid: state.user.uid + '' } }, { getMockUrl: getMockUrl } ) class Activity extends Component { constructor(props) { super(props); this.state = { mockURL: "" } } static propTypes = { uid: PropTypes.string, getMockUrl: PropTypes.func, match: PropTypes.object } componentWillMount(){ const that = this; this.props.getMockUrl(2724).then(function(data){ const { prd_host, basepath, protocol } = data.payload.data.data; const mockURL = `${protocol}://${prd_host}${basepath}/{path}`; that.setState({ mockURL: mockURL }) }) } render () { return (
{this.state.mockURL}