fix(SW-3186): Replaced hash functionality for filters with query parameters

Approved-by: Linus Flood
Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-08-15 09:00:32 +00:00
parent 57c6f59449
commit 47e5a55d13
4 changed files with 5 additions and 92 deletions

View File

@@ -20,8 +20,8 @@ export default function DestinationDataProviderContent({
const currentUrl = new URL(window.location.href)
const searchParams = currentUrl.searchParams
const currentPathname = currentUrl.pathname
const currentHash = currentUrl.hash
const sort = searchParams.get("sort")
const filterParam = searchParams.get("filter")
const filters = []
const pathParts = currentPathname.split("/")
const lastPathPart = pathParts[pathParts.length - 1]
@@ -29,9 +29,8 @@ export default function DestinationDataProviderContent({
if (basePath !== currentPathname) {
filters.push(lastPathPart)
}
if (currentHash) {
const hashValue = currentHash.substring(1)
filters.push(...hashValue.split("&"))
if (filterParam) {
filters.push(...filterParam.split("&"))
}
updateActiveFiltersAndSort(filters, sort)