import React, { useEffect, useState } from 'react'; interface Performer { id: number; title: string; chapter: string; img: string; Program: string; } export default function ContinueLearning() { const [courseData, setData] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); useEffect(() => { fetch('http://localhost:5174/api/continue-learning') .then(res => { if (!res.ok) { throw new Error('Network response was not ok'); } return res.json(); }) .then(data => { console.log(data) setData(data); setLoading(false); }) .catch(error => { console.error('Error fetching data:', error); setError(error); setLoading(false); }); }, []); if (loading) { return
Loading...
; } if (error) { return
Error: {error.message}
; } return (

Continue Learning

{courseData.map(data=>(

{data.title}

Chapter {data.chapter} •   {data.Program}

))}
) }