Skip to content

Implement Skeleton Loaders for Dashboard Data Fetching #752

Description

@Adithyakp86

Description

Currently, when data is being fetched from Firebase for the Doctor and Patient dashboards (like appointments, vitals, or patient lists), the UI might show a blank space or a generic loading text/spinner. To improve the perceived performance and User Experience (UX), we should implement Skeleton Loaders.

Expected Behavior

Instead of a blank screen or a plain "Loading..." text, users should see a skeleton placeholder that mimics the layout of the content being loaded (e.g., skeleton cards for appointments, skeleton table rows for the patient list).

Tasks

  • Create a reusable <Skeleton /> component (using Tailwind CSS for pulsing animations).
  • Implement skeleton loaders in the Doctor Dashboard (pages/doctor/...) while fetching patient data/alerts.
  • Implement skeleton loaders in the Patient Dashboard (pages/patient/...) while fetching prescriptions/appointments.
  • Ensure the skeleton components fully support Dark Mode.

Tech Stack

  • Next.js
  • React
  • Tailwind CSS

Additional Context

Tailwind's animate-pulse utility class is perfect for this. E.g., <div className="animate-pulse bg-gray-200 dark:bg-gray-700 rounded-md h-4 w-full"></div>.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions