import React,{useState,useEffect} from 'react';
import Title from '../../forge/Component/Title';
import Axios from 'axios';
import RenderHtml from '../../components/render-html';
import { Skeleton } from 'antd';

function Preface(props){
  const [ value , setValue ] = useState(undefined);

  useEffect(()=>{
      const url = `/helps/introduction.json`;
      Axios.get(url).then(result=>{
          if(result){
              setValue(result.data.data.content);
          }
      }).catch(error=>{})
  },[])
  return(
    <div>
      <Title>引言</Title>
      <div class="contents">
        {
          value ? 
          <RenderHtml className="break_word_comments imageLayerParent" value={value} url={props.history.location}/>
          :
          <Skeleton />
        }
      </div>
    </div>
  )
}
export default Preface;