Skip to content

Commit

Permalink
fix: remove conflict-at-source query param when set to false
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed Oct 18, 2024
1 parent b2c6cff commit c082e1f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/account/useModerateItemsSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ export function useModerateItemsSearch(): UseModerateItemsSearchResult {
const router = useRouter()

function getSearchModerateItemsLink(query: ModerateItemsPage.SearchParamsInput) {
// FIXME: https://github.com/SSHOC/sshoc-marketplace-backend/issues/477#issuecomment-2422307954
if (query['d.conflict-at-source'] === false) {
// @ts-expect-error It's ok.
delete query['d.conflict-at-source']
}

/** Filter out empty values to avoid `key=` query parameters. */
return {
href: routes.ModerateItemsPage(sanitizeSearchParams(query)),
Expand Down

0 comments on commit c082e1f

Please sign in to comment.