From dc1f033d7168ee0af9938c0f526a40e9526a706b Mon Sep 17 00:00:00 2001 From: Aman Singh Date: Sat, 9 Dec 2023 22:00:13 +0530 Subject: [PATCH] Fixed admin card navigation in dashboard (#1168) * fixed admin card navigation in dashboard * removed the use of any --- .../OrganizationDashboard/OrganizationDashboard.tsx | 2 +- src/screens/OrganizationPeople/OrganizationPeople.tsx | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.tsx b/src/screens/OrganizationDashboard/OrganizationDashboard.tsx index 60e31396a5..5205cae25b 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.tsx +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.tsx @@ -137,7 +137,7 @@ function organizationDashboard(): JSX.Element { role="button" className="mb-4" onClick={(): void => { - history.push(peopleLink); + history.push(peopleLink, { role: 1 }); }} > (); + const role = location?.state; + const currentUrl = window.location.href.split('=')[1]; - const [state, setState] = useState(0); + const [state, setState] = useState(role?.role || 0); const [page, setPage] = useState(0); const [rowsPerPage, setRowsPerPage] = useState(5);