Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into Move-AddJob-to-Popup

This commit is contained in:
2023-06-17 06:21:49 +01:00
15 changed files with 240 additions and 150 deletions
+1 -1
View File
@@ -12,4 +12,4 @@ export default function MyJobsPage() {
/>
</>
);
}
}
+21 -2
View File
@@ -1,10 +1,29 @@
import React from "react";
import React,{useState, useEffect} from "react";
import Settings from "../components/Settings";
import usersService from "../services/UsersService";
export default function SettingsPage() {
const apiCall = new usersService()
let [faq, setFaq] = useState({loading:true, data:[]}) // STATE TO HOLD FAQ DATA
//FUNCTION TO GET FAQ
const getFaq = () => {
apiCall.getFaq().then(res => {
setFaq({loading:false, data:res.data.result_list})
}).catch(err => {
setFaq({loading:false, data:[]})
console.log('Error', err)
})
}
useEffect(()=>{
getFaq()
},[])
return (
<>
<Settings />
<Settings faq={faq} />
</>
);
}