feat(SW-1883): Added links to the filter values on the destination pages
Approved-by: Fredrik Thorsson
This commit is contained in:
@@ -74,6 +74,10 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.visuallyHidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
.overlay {
|
.overlay {
|
||||||
height: var(--visual-viewport-height);
|
height: var(--visual-viewport-height);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
|
import Link from "next/link"
|
||||||
import { useRouter } from "next/navigation"
|
import { useRouter } from "next/navigation"
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
@@ -60,6 +61,7 @@ export default function DestinationFilterAndSort({
|
|||||||
resetPendingValues: state.actions.resetPendingValues,
|
resetPendingValues: state.actions.resetPendingValues,
|
||||||
setIsLoading: state.actions.setIsLoading,
|
setIsLoading: state.actions.setIsLoading,
|
||||||
}))
|
}))
|
||||||
|
const { facilityFilters, surroundingsFilters } = filters
|
||||||
const alertHeading =
|
const alertHeading =
|
||||||
listType === "city"
|
listType === "city"
|
||||||
? intl.formatMessage({ id: "No matching locations found" })
|
? intl.formatMessage({ id: "No matching locations found" })
|
||||||
@@ -189,6 +191,22 @@ export default function DestinationFilterAndSort({
|
|||||||
</Modal>
|
</Modal>
|
||||||
</ModalOverlay>
|
</ModalOverlay>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
|
|
||||||
|
{/* This section is added to the DOM for SEO purposes. The filters are linkable and should be indexable */}
|
||||||
|
<nav className={styles.visuallyHidden}>
|
||||||
|
<ul>
|
||||||
|
{facilityFilters.map((filter) => (
|
||||||
|
<li key={`filter-${filter.slug}`}>
|
||||||
|
<Link href={`${basePath}/${filter.slug}`}>{filter.name}</Link>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
{surroundingsFilters.map((filter) => (
|
||||||
|
<li key={`filter-${filter.slug}`}>
|
||||||
|
<Link href={`${basePath}/${filter.slug}`}>{filter.name}</Link>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
"use client"
|
||||||
|
|
||||||
import { useParams } from "next/navigation"
|
import { useParams } from "next/navigation"
|
||||||
import { useEffect } from "react"
|
import { useEffect } from "react"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user