refactor search_results component to allow custom sorting