Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Yev Moroz committed Apr 18, 2024
1 parent 7742087 commit b6bead3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 44 deletions.
11 changes: 1 addition & 10 deletions src/features/charging-station/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useCallback, useEffect, useState } from 'react';

Check warning on line 1 in src/features/charging-station/hooks.ts

View workflow job for this annotation

GitHub Actions / publish

'useCallback' is defined but never used

import { ApiError } from '../api-error';
import { fetchApi as fetchEvEnergyApi } from '../ev-energy/utils';
import { OptionalLocationDetails } from '../location/hooks';
import { fetchApi as fetchOpenChargeMapApi, getApiUrlForPath } from '../open-charge-map/utils';

Expand Down Expand Up @@ -58,14 +57,6 @@ export const useStartCharging = (
): [ApiError | null, () => void] => {
const [chargingError, setChargingError] = useState<ApiError | null>(null);

Check warning on line 58 in src/features/charging-station/hooks.ts

View workflow job for this annotation

GitHub Actions / publish

'setChargingError' is assigned a value but never used

const startCharging = useCallback(() => {
return fetchEvEnergyApi('chargingsession', 'POST', {
user: 1,
car_id: 1,
charger_id: chargerId,
})
.then(() => onChargingStarted(chargerId))
.catch(setChargingError);
}, [chargerId]);
const startCharging = () => {}

Check warning on line 60 in src/features/charging-station/hooks.ts

View workflow job for this annotation

GitHub Actions / publish

Insert `;`
return [chargingError, startCharging];
};
4 changes: 0 additions & 4 deletions src/features/ev-energy/const.ts

This file was deleted.

30 changes: 0 additions & 30 deletions src/features/ev-energy/utils.ts

This file was deleted.

0 comments on commit b6bead3

Please sign in to comment.