refactoring adsComponentView.ts