Skip to content

Commit

Permalink
Merge pull request #1255 from navikt/ORG-1629-bugfix-export-person-bu…
Browse files Browse the repository at this point in the history
…tton-inconsistent-behaviour

use explicit search param instead of if there is a search param at all
  • Loading branch information
johannbm authored Oct 25, 2023
2 parents ce0ceb3 + b68db2c commit 25aacc8
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 25aacc8

Please sign in to comment.