Skip to content

Fix WebSocket port, depreciation mock, reservations and notifications mock data - #1689

Merged
yusuftomilola merged 6 commits into
DistinctCodes:mainfrom
devzakari-sketch:fix/websocket-depreciation-reservations-notifications
Oct 17, 2026
Merged

yusuftomilola merged 6 commits into
DistinctCodes:mainfrom
devzakari-sketch:fix/websocket-depreciation-reservations-notifications

Conversation

@devzakari-sketch

Copy link
Copy Markdown
Contributor

Summary

This PR addresses four frontend issues with small, focused changes:

#1627 - useWebSocket defaults to port 8000 instead of 6003

  • Updated hooks/useWebSocket.ts to derive the default WebSocket URL from NEXT_PUBLIC_API_URL instead of hardcoding port 8000.
  • Added the access token to the socket handshake via the auth option for authenticated connections.

#1614 - DepreciationSchedule renders mock data instead of real schedule

  • Updated components/assets/depreciation-schedule.tsx to accept an assetId prop and fetch real data from GET /assets/:id/depreciation via the API client.
  • Removed MOCK_DATA and added loading, error, and "no depreciation configured" states.

#1613 - Reservations page uses mock data

  • Created lib/api/reservations.ts with a typed API client (list mine/all, create, cancel, confirm, availability).
  • Updated reservations/page.tsx to load reservations from the API instead of MOCK, with loading and empty states.

#1612 - Notifications page renders hard-coded mock data

  • Created lib/api/notifications.ts with a typed API client (list, unread count, mark read, mark all read).
  • Updated notifications/page.tsx to load from the API, with loading, error, and empty states; removed MOCK_NOTIFICATIONS.

Closes #1627
Closes #1614
Closes #1613
Closes #1612

@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

@devzakari-sketch is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@devzakari-sketch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@yusuftomilola
yusuftomilola merged commit 1476a8e into DistinctCodes:main Oct 17, 2026
0 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants