Skip to content

Commit

Permalink
feat : updated query key to include location
Browse files Browse the repository at this point in the history
  • Loading branch information
fredygerman committed Feb 11, 2024
1 parent f8107ed commit d831834
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/power-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default function PowerStatus({
}) {
const { data, isError, isLoading, isSuccess, isFetching, refetch } =
useQuery<fetchStatusResponse>({
queryKey: ['status', location],
queryFn: () => fetchStatus(location) as any,
initialData: initialData as any,
refetchInterval: 30 * 1000,
Expand Down

0 comments on commit d831834

Please sign in to comment.