diff --git a/libs/blocks/quiz-entry/quiz-entry.js b/libs/blocks/quiz-entry/quiz-entry.js index 294a7cc18f..5ffecb10ed 100644 --- a/libs/blocks/quiz-entry/quiz-entry.js +++ b/libs/blocks/quiz-entry/quiz-entry.js @@ -3,6 +3,7 @@ import { getQuizEntryData, handleNext, handleSelections } from './utils.js'; import { mlField, getMLResults } from './mlField.js'; import { GetQuizOption } from './quizoption.js'; import { quizPopover, getSuggestions } from './quizPopover.js'; +import { getConfig } from '../../utils/utils.js'; export const locationWrapper = { redirect: (url) => { @@ -343,7 +344,8 @@ const App = ({ if (!dataLoaded || !selectedQuestion) return null; - return html`
${quizLists.strings[selectedQuestion.questions]['sub-head']}
diff --git a/libs/blocks/quiz-entry/quizoption.js b/libs/blocks/quiz-entry/quizoption.js index 83a3e710f0..031d1ff0c5 100644 --- a/libs/blocks/quiz-entry/quizoption.js +++ b/libs/blocks/quiz-entry/quizoption.js @@ -1,6 +1,7 @@ import { html, useState, useEffect } from '../../deps/htm-preact.js'; import { getSwipeDistance, getSwipeDirection } from '../carousel/carousel.js'; import { createTag } from '../../utils/utils.js'; +import { removeLeftToRightMark } from '../quiz/utils.js'; export const OptionCard = ({ text, title, image, icon, iconTablet, iconDesktop, options, @@ -18,13 +19,13 @@ export const OptionCard = ({ const getIconHtml = () => html` `; - const imageHtml = image ? html`` : null; + const imageHtml = image ? html`` : null; const titleHtml = title ? html`${title}
` : null; const textHtml = text ? html`${text}
` : null; diff --git a/libs/blocks/quiz-entry/utils.js b/libs/blocks/quiz-entry/utils.js index dfca985432..787b4ee79a 100644 --- a/libs/blocks/quiz-entry/utils.js +++ b/libs/blocks/quiz-entry/utils.js @@ -1,4 +1,4 @@ -import { getNormalizedMetadata } from '../quiz/utils.js'; +import { getNormalizedMetadata, getLocalizedURL } from '../quiz/utils.js'; export async function fetchJson(path) { const response = await fetch(path); @@ -104,8 +104,8 @@ export const handleSelections = (prevSelections, selectedQuestion, selections) = export async function getQuizEntryData(el) { const blockData = getNormalizedMetadata(el); - const dataPath = blockData.data.text; - const quizPath = blockData.quiz.text; + const dataPath = getLocalizedURL(blockData.data.text); + const quizPath = getLocalizedURL(blockData.quiz.text); const maxQuestions = Number(blockData.maxquestions?.text) || 10; const analyticsType = blockData.analyticstype?.text; const analyticsQuiz = blockData.analyticsquiz?.text;