Skip to content

Commit

Permalink
fix: style
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardocasares committed Mar 20, 2021
1 parent 5d38b15 commit 68a25b6
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/graphql/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ import {
StationSearchInput,
} from "@/graphql";

export function useStations(
export const useStations = (
search: StationSearchInput,
station: StationRequest = everything
) {
const fetcher = () => client.query({ stations: [{ search }, station] });
return useSWR(JSON.stringify({ search, station }), fetcher);
}
) =>
useSWR(JSON.stringify({ search, station }), () =>
client.query({ stations: [{ search }, station] })
);

export function useStationsByUUID(
export const useStationsByUUID = (
uuids: string[],
station: StationRequest = everything
) {
const fetcher = (uuids: string[]) =>
client.query({ stationsByUUID: [{ uuids }, station] });
return useSWR([uuids], fetcher);
}
) =>
useSWR([uuids], (uuids: string[]) =>
client.query({ stationsByUUID: [{ uuids }, station] })
);

1 comment on commit 68a25b6

@vercel
Copy link

@vercel vercel bot commented on 68a25b6 Mar 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.