Skip to content

Enhancement: Consolidate Loader.jsx and LoadingSpinner.jsx into a single reusable component #4

Description

@AA1-34-Ganesh

Description

We currently have duplicate logic for loading spinners across the app:

  1. LoadingSpinner.jsx — hardcoded size, violet color.
  2. Loader.jsx — accepts size props, blue color.
  3. Inline spinners inside Login.jsx.

We need to consolidate these into a single, highly reusable Loader.jsx component.

Tasks

  • Update smart_exam_reval/frontend/src/components/Loader.jsx to accept props for size (small/medium/large), optional text, and fullScreen boolean.
  • Delete LoadingSpinner.jsx.
  • Search the codebase for imports of LoadingSpinner and replace them with the newly updated Loader component.
  • Replace the hardcoded inline spinner in Login.jsx with the <Loader /> component.

Files Involved

  • smart_exam_reval/frontend/src/components/Loader.jsx
  • smart_exam_reval/frontend/src/components/LoadingSpinner.jsx (to delete)
  • smart_exam_reval/frontend/src/pages/Login.jsx

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions