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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user