Ignore:
Timestamp:
09/04/26 19:08:08 (2 weeks ago)
Author:
MBK <marija.karapandzova@…>
Branches:
master
Children:
cdcff72
Parents:
e1f74f6
Message:

Fix frontend appearance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/pages/doctors/DoctorDetail.js

    re1f74f6 r9af201e  
    2424
    2525  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
    2639    fetchDoctor();
    2740  }, [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   };
    4141
    4242  if (loading) return <Loading />;
Note: See TracChangeset for help on using the changeset viewer.