Skip to content

delete mock data and replace it with Indisponible for Null and Undefined values

yassine sabir a demandé de fusionner bugFix/Remove-Hardcoded-Values vers develop

Main changes:

  • Removal of showMockData and LOADING_TIMEOUT: no more timeout logic or mock data.
  • Removal of useEffect: no more timeout management.
  • Helper function getValueOrUnavailable: returns "Unavailable" if the value is null, undefined, or empty.
  • Helper functions getFirstName and getLastName: extract first/last name from driverName and return "Unavailable" if absent.
  • Display during loading: spinner only if isLoading && !data; otherwise, display fields with empty values ​​or "Unavailable" depending on the received data.

Rapports de requête de fusion