import useContestMetadata from '../useContestMetadata';
const useContestLink = function useContestLink(contestId) {
  const meta = useContestMetadata(contestId);
  if (!meta) return undefined;
  const {
    stateFips,
    office = 'index'
  } = meta;
  return `state:${stateFips}:${office}`;
};
export default useContestLink;