UNPKG

@kadconsulting/dry

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