Transform getSiteFromTab to helper