refactor: make search view DRY