Merged in fix/accordion (pull request #1318)
Fix/accordion * fix(SW-1621): show all children in accordion * fix(SW-1621): change FAQ label Approved-by: Erik Tiekstra
This commit is contained in:
@@ -14,6 +14,7 @@ import styles from "./accordion.module.css"
|
||||
|
||||
import type { AccordionProps } from "@/types/components/blocks/Accordion"
|
||||
import { HotelHashValues } from "@/types/components/hotelPage/tabNavigation"
|
||||
import type { RTENode } from "@/types/transitionTypes/rte/node"
|
||||
|
||||
export default function AccordionSection({ accordion, title }: AccordionProps) {
|
||||
const intl = useIntl()
|
||||
@@ -36,10 +37,15 @@ export default function AccordionSection({ accordion, title }: AccordionProps) {
|
||||
>
|
||||
{accordion.map((acc) => (
|
||||
<AccordionItem key={acc.question} title={acc.question}>
|
||||
<JsonToHtml
|
||||
embeds={acc.answer.embedded_itemsConnection.edges}
|
||||
nodes={acc.answer.json?.children[0].children}
|
||||
/>
|
||||
{acc.answer.json.children.map(
|
||||
(child: { children: RTENode[] }, idx: number) => (
|
||||
<JsonToHtml
|
||||
key={acc.question + idx}
|
||||
embeds={acc.answer.embedded_itemsConnection.edges}
|
||||
nodes={child.children}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
</AccordionItem>
|
||||
))}
|
||||
</Accordion>
|
||||
@@ -48,12 +54,6 @@ export default function AccordionSection({ accordion, title }: AccordionProps) {
|
||||
<ShowMoreButton
|
||||
loadMoreData={toggleAccordions}
|
||||
showLess={allAccordionsVisible}
|
||||
textShowMore={intl.formatMessage({
|
||||
id: "See all FAQ",
|
||||
})}
|
||||
textShowLess={intl.formatMessage({
|
||||
id: "See less FAQ",
|
||||
})}
|
||||
/>
|
||||
) : null}
|
||||
</SectionContainer>
|
||||
|
||||
@@ -485,13 +485,11 @@
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
"Scandic Friends Point Shop": "Scandic Friends Point Shop",
|
||||
"Search": "Søge",
|
||||
"See all FAQ": "Se alle FAQ",
|
||||
"See all photos": "Se alle billeder",
|
||||
"See alternative hotels": "See alternative hotels",
|
||||
"See destination": "Se destination",
|
||||
"See details": "Se detaljer",
|
||||
"See hotel details": "Se hoteloplysninger",
|
||||
"See less FAQ": "Se mindre FAQ",
|
||||
"See map": "Vis kort",
|
||||
"See on map": "Se på kort",
|
||||
"See results ({ count })": "Se resultater ({ count })",
|
||||
|
||||
@@ -486,13 +486,11 @@
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
"Scandic Friends Point Shop": "Scandic Friends Point Shop",
|
||||
"Search": "Suchen",
|
||||
"See all FAQ": "Siehe alle FAQ",
|
||||
"See all photos": "Alle Fotos ansehen",
|
||||
"See alternative hotels": "See alternative hotels",
|
||||
"See destination": "Siehe Ziel",
|
||||
"See details": "Siehe Einzelheiten",
|
||||
"See hotel details": "Hotelinformationen ansehen",
|
||||
"See less FAQ": "Weniger anzeigen FAQ",
|
||||
"See map": "Karte anzeigen",
|
||||
"See on map": "Karte ansehen",
|
||||
"See results ({ count })": "Ergebnisse anzeigen ({ count })",
|
||||
|
||||
@@ -491,13 +491,11 @@
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
"Scandic Friends Point Shop": "Scandic Friends Point Shop",
|
||||
"Search": "Search",
|
||||
"See all FAQ": "See all FAQ",
|
||||
"See all photos": "See all photos",
|
||||
"See alternative hotels": "See alternative hotels",
|
||||
"See destination": "See destination",
|
||||
"See details": "See details",
|
||||
"See hotel details": "See hotel details",
|
||||
"See less FAQ": "See less FAQ",
|
||||
"See map": "See map",
|
||||
"See on map": "See on map",
|
||||
"See results ({ count })": "See results ({ count })",
|
||||
|
||||
@@ -486,13 +486,11 @@
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
"Scandic Friends Point Shop": "Scandic Friends Point Shop",
|
||||
"Search": "Haku",
|
||||
"See all FAQ": "Katso kaikki UKK",
|
||||
"See all photos": "Katso kaikki kuvat",
|
||||
"See alternative hotels": "See alternative hotels",
|
||||
"See destination": "Katso kohde",
|
||||
"See details": "Katso tiedot",
|
||||
"See hotel details": "Katso hotellin tiedot",
|
||||
"See less FAQ": "Katso vähemmän UKK",
|
||||
"See map": "Näytä kartta",
|
||||
"See on map": "Näytä kartalla",
|
||||
"See results ({ count })": "Katso tulokset ({ count })",
|
||||
|
||||
@@ -484,13 +484,11 @@
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
"Scandic Friends Point Shop": "Scandic Friends Point Shop",
|
||||
"Search": "Søk",
|
||||
"See all FAQ": "Se alle FAQ",
|
||||
"See all photos": "Se alle bilder",
|
||||
"See alternative hotels": "See alternative hotels",
|
||||
"See destination": "Se destinasjon",
|
||||
"See details": "Se detaljer",
|
||||
"See hotel details": "Se hotellinformasjon",
|
||||
"See less FAQ": "Se mindre FAQ",
|
||||
"See map": "Vis kart",
|
||||
"See on map": "Se på kart",
|
||||
"See results ({ count })": "Se resultater ({ count })",
|
||||
|
||||
@@ -484,13 +484,11 @@
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
"Scandic Friends Point Shop": "Scandic Friends Point Shop",
|
||||
"Search": "Sök",
|
||||
"See all FAQ": "Se alla FAQ",
|
||||
"See all photos": "Se alla foton",
|
||||
"See alternative hotels": "See alternative hotels",
|
||||
"See destination": "Se destination",
|
||||
"See details": "Se detaljer",
|
||||
"See hotel details": "Se hotellinformation",
|
||||
"See less FAQ": "See färre FAQ",
|
||||
"See map": "Visa karta",
|
||||
"See on map": "Se på karta",
|
||||
"See results ({ count })": "Se resultat ({ count })",
|
||||
|
||||
Reference in New Issue
Block a user