Corrected hook for adding pending referral