I need to create different routes in React admin, all based on the same endpoint but with a different filter. My need is that I need a Menu entry to show all properties with status = approved, all properties with status = review and so on. I tried doing this:
export default function App() {
return (
<Admin
loginPage={CustomLoginPage}
dataProvider={dataProvider}
authProvider={authProvider}
>
<Resource
name="properties"
options={{ label: 'Properties in review' }}
icon={UserIcon}
list={PropertyReviewList}
show={PropertyShow}
edit={PropertyEdit}
/>
<Resource
name="properties"
options={{ label: 'Properties Approved' }}
icon={UserIcon}
list={PropertyApprovedList}
show={PropertyShow}
edit={PropertyEdit}
/>
</Admin>
);
}
but this is not working as only the last defined property is showing. What is the best way to achieve what I am trying to achieve?