Skip to content

Commit

Permalink
use explicit search param instead of if there is a search param at all
Browse files Browse the repository at this point in the history
  • Loading branch information
johannbm committed Oct 25, 2023
1 parent ce0ceb3 commit b68db2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/frontend/src/pages/membership/MembershipsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function MembershipsPage() {

function ShowCorrectExportButton() {
const { roleAsList, productAreaIdAsList, clusterIdAsList, teamIdAsList } = useGetParsedSearchParameters();
const { search } = useLocation();
const { showUniqueMemberships } = useGetParsedSearchParameters();
if (roleAsList.length === 1) {
return <MemberExportForRole role={roleAsList[0]} />;
}
Expand All @@ -102,7 +102,7 @@ function ShowCorrectExportButton() {
return <MemberExportForTeam teamId={teamIdAsList[0]} />;
}

if (!search) {
if (!showUniqueMemberships) {
return <AllMemberExport />;
}

Expand Down

0 comments on commit b68db2c

Please sign in to comment.