7 Commits
Author SHA1 Message Date
hamedandClaude Fable 5 daf38c8631 feat(maintenance): show maintenance page when the API is in maintenance
The backend now answers 503 with code MAINTENANCE_MODE while maintenance is
on. Without this change a visitor got a red error toast over a broken page
client-side, and a silently empty page server-side, because fetchReq discards
the status and returns null on any failure.

- lib/maintenance.js detects the state by BOTH status 503 and the error code;
  a bare 503 can come from a reverse proxy and is not maintenance
- The axios interceptor checks it before the 401 branch, so a maintenance
  response never triggers the refresh-token path or logs the user out
- fetchReq redirects to /maintenance, with a silentMaintenance opt-out used by
  getStateInfo: that one runs inside generateMetadata and while rendering the
  maintenance page itself, where a redirect is either ineffective or loops
- redirect() works by throwing, so the try/catch blocks in the doctors,
  clinics and specialties pages now rethrow NEXT_REDIRECT instead of
  swallowing it
- clinicApi.js handles 503 too; it previously rendered maintenance as a clinic
  with zero doctors
- The page reuses the existing 404 design and is marked noindex

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 22:01:45 +03:30
hamed 4dca516598 feat(clinic): enhance doctor data handling with improved pagination and default values 2026-06-18 19:16:52 +03:30
Arezoo 79ff139779 loading ,page 2025-10-27 10:58:26 +03:30
Arezoo 34188ab366 error handeling on the pagination 2025-10-22 17:38:29 +03:30
Arezoo f22526bff3 paginations ,limit=50 2025-10-22 14:30:30 +03:30
Arezoo bfd797dd02 api change 2025-10-21 14:32:13 +03:30
Arezoo 2cbf96ec6f handel filter clinic and added changenumber function 2025-10-21 13:31:44 +03:30