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

function FAQ(props){
    const [ value , setValue ] = useState(undefined);
  
    useEffect(()=>{
        const url = `/helps/faq.json`;
        Axios.get(url).then(result=>{
            if(result){
                setValue(result.data.data.content);
            }
        }).catch(error=>{})
    },[])
  return(
    <div>
      <Title>常见问题</Title>
      <div class="contents">
        <div className="pre">
            {
              value ? 
                <RenderHtml className="break_word_comments imageLayerParent" value={value} url={props.history.location}/>
              :
                <Skeleton />
            }
        </div>
      </div>
    </div>
  )
}
export default FAQ;