[frontend] Refactor courses views