import useResults from '../useResults';
const useCandidateResults = function useCandidateResults(resultsId, candidateId) {
  const results = useResults(resultsId);
  if (!results) return undefined;
  return results.results.find(({
    id
  }) => id === candidateId);
};
export default useCandidateResults;