REFACTOR: refactor the dashboard view
Refactoring Task
Problem description
The dashboard page code is too long and has too much functionality, which needs to be broken up to make the page more maintainable and make the page components reusable in other pages.
Affected Components/Files:
src/app/exhibitions/page.tsx
Tasks:
- Move page components to separate files.
- Separate as much business logic as possible into separate files.
- Create a 'constants' directory, move all configuration constants (file size, timeout duration, etc) into a separate file, and reference those from that file. (+ maybe find where the same constants are in other files and change those too)
- Change the names of project constants to upper snake case for better readability (i.e timeoutDuration -> TIMEOUT_DURATION).
- Fix any other issues regarding linting or good practices.
Acceptance Criteria:
-
Page components are moved to separate files -
All constants are referenced from a constants file. -
The file contains as little business logic as possible. -
The file is under 300 lines
Edited by henrikin