Skip to content

Commit

Permalink
errors first
Browse files Browse the repository at this point in the history
  • Loading branch information
Yev Moroz committed Feb 2, 2024
1 parent 75eb179 commit 7742087
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/features/charging-station/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ export const ChargingStation = () => {
const notReadyYet = locationNotReady || chargingStationsNotReady;

let content;
if (notReadyYet) {
content = <Message>Waiting on charging stations to be ready</Message>;
} else if (locationError) {
if (locationError) {
content = <Message>Location access required</Message>;
} else if (chargingStationsError) {
content = <Message>Charging stations not available</Message>;
} else if (notReadyYet) {
content = <Message>Waiting on charging stations to be ready</Message>;
} else if (!chargingStations?.length) {
content = <Message>No charging stations found in the area</Message>;
} else {
Expand Down

0 comments on commit 7742087

Please sign in to comment.