NextJS: Use same component in multiple routes for multiple pages
问题 In my NextJS app, I have a search bar component OrderSearchBar.js and I want to use it in both index.js and /purchases.js pages but with different endpoints.For example,if I click search button on the index.js page,it should post form content to /orders and on the /purchases.js , form content should post to /purchaseDetails.Is there any way to accomplish this? OrderSearchBar.js class OrderSearchBar extends Component{ constructor(props) { super(props); this.onChangeInput = this.onChangeInput