UNPKG

@kadconsulting/dry

Version:
25 lines 953 B
// @ts-nocheck import { useState, useEffect } from 'react'; import { fetchCoachingPhilosophyPageData, } from '../api/fetchData'; export const useCoachingPhilosophyPageData = () => { const [aboutSections, setCoachingPhilosophySections] = useState(null); const [loading, setLoading] = useState(true); useEffect(() => { const fetchCoachingPhilosophyData = async () => { setLoading(true); try { const response = await fetchCoachingPhilosophyPageData(); setCoachingPhilosophySections(response?.data?.attributes || null); } catch (error) { console.error('Failed to fetch about page data', error); } finally { setLoading(false); } }; fetchCoachingPhilosophyData(); }, []); return { aboutSections, loading }; }; //# sourceMappingURL=useCoachingPhilosophyPageData.js.map