Changeset 9af201e for frontend/src/pages/doctors/DoctorDetail.js
- Timestamp:
- 09/04/26 19:08:08 (2 weeks ago)
- Branches:
- master
- Children:
- cdcff72
- Parents:
- e1f74f6
- File:
-
- 1 edited
-
frontend/src/pages/doctors/DoctorDetail.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/pages/doctors/DoctorDetail.js
re1f74f6 r9af201e 24 24 25 25 useEffect(() => { 26 const fetchDoctor = async () => { 27 try { 28 setLoading(true); 29 const response = await doctorService.getDoctorById(id); 30 setDoctor(response.data); 31 } catch (err) { 32 setError('Failed to fetch doctor details'); 33 console.error(err); 34 } finally { 35 setLoading(false); 36 } 37 }; 38 26 39 fetchDoctor(); 27 40 }, [id]); 28 29 const fetchDoctor = async () => {30 try {31 setLoading(true);32 const response = await doctorService.getDoctorById(id);33 setDoctor(response.data);34 } catch (err) {35 setError('Failed to fetch doctor details');36 console.error(err);37 } finally {38 setLoading(false);39 }40 };41 41 42 42 if (loading) return <Loading />;
Note:
See TracChangeset
for help on using the changeset viewer.
