about icons and faq API added
This commit was merged in pull request #7.
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
import React from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import thumb from '../../assets/images/service-page.jpg';
|
||||
import ServiceSideMenu from './ServiceSideMenu';
|
||||
import getConfig from './../../Config/config'
|
||||
import {Link} from 'react-router-dom'
|
||||
import FaqData from '../../Services/FaqData';
|
||||
|
||||
function FAQService() {
|
||||
var site = getConfig()[0];
|
||||
let [faq, setFaq] = useState([])
|
||||
|
||||
let dummyFaq = [1,2,3,4,5]
|
||||
useEffect(()=>{
|
||||
FaqData().then(res => {
|
||||
console.log(res)
|
||||
setFaq(res.data.result_list)
|
||||
}).catch(err => {
|
||||
console.log('You got an error ========> '+ err)
|
||||
})
|
||||
},[])
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -18,24 +26,24 @@ function FAQService() {
|
||||
<ServiceSideMenu />
|
||||
</div>
|
||||
<div className="col-lg-8">
|
||||
<div className="faq-details-content">
|
||||
<div className="service-details-content">
|
||||
<div className="container-fluid">
|
||||
<h1 className='display-4'>Frequently asked questions</h1>
|
||||
<h3>Frequently asked questions</h3>
|
||||
</div>
|
||||
<div class="accordion" id="accordionExample">
|
||||
{dummyFaq.map((item, index)=>(
|
||||
{faq.map((item, index)=>(
|
||||
<div key={index} class="card">
|
||||
<div class="card-header" id={`heading${index}`}>
|
||||
<h2 class="mb-0">
|
||||
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target={`#collapse${index}`} aria-expanded="true" aria-controls={`collapse${index}`}>
|
||||
Item {index+1}
|
||||
</button>
|
||||
</h2>
|
||||
<h2 class="mb-0">
|
||||
<button class="btn btn-block text-left" type="button" data-toggle="collapse" data-target={`#collapse${index}`} aria-expanded="true" aria-controls={`collapse${index}`}>
|
||||
{item.title}
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div id={`collapse${index}`} class={`${index > 0 ? 'collapse' : 'collapse show'}`} aria-labelledby={`heading${index}`} data-parent="#accordionExample">
|
||||
<div class="card-body">
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
|
||||
{item.msg}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user