@autobusal/map 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/Map.tsx +2 -2
  2. package/package.json +1 -1
  3. package/services.ts +1 -1
package/Map.tsx CHANGED
@@ -4,7 +4,7 @@ import { Meta } from '@autobusal/common';
4
4
  import Column from './Column/Column';
5
5
  import Display from './Display/Display';
6
6
  import { CityData } from '@autobusal/providers/types/locations';
7
- import { GetLocations } from './services';
7
+ import { useGetLocations } from './services';
8
8
 
9
9
  interface Props {
10
10
  t: TFunction<'common'>
@@ -14,7 +14,7 @@ const Map = ({ t }: Props): JSX.Element => {
14
14
  const [ from, setFrom ] = useState<CityData | null>(null);
15
15
  const [ to, setTo ] = useState<CityData | null>(null);
16
16
 
17
- const { data } = GetLocations();
17
+ const { data } = useGetLocations();
18
18
 
19
19
  const onSelected = (selected: CityData): void => {
20
20
  if (from === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/map",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "main": "index.ts"
6
6
  }
package/services.ts CHANGED
@@ -2,7 +2,7 @@ import { useSuspenseQuery, UseSuspenseQueryResult } from '@tanstack/react-query'
2
2
  import { apiClient } from '@autobusal/providers';
3
3
  import { CityData } from '@autobusal/providers/types/locations';
4
4
 
5
- export const GetLocations = (): UseSuspenseQueryResult<CityData[]> => (
5
+ export const useGetLocations = (): UseSuspenseQueryResult<CityData[]> => (
6
6
  useSuspenseQuery({
7
7
  queryKey: ['locations-map'],
8
8
  queryFn: async () => (