File size: 319 Bytes
8a37e0a
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { useGetCurrentQueueItemQuery } from 'services/api/endpoints/queue';

export const useCurrentDestination = () => {
  const { destination } = useGetCurrentQueueItemQuery(undefined, {
    selectFromResult: ({ data }) => ({
      destination: data ? data.destination : null,
    }),
  });

  return destination;
};