-
This is usefull to render templates with an improved UX example const template = `
<div class="d-flex align-items-center justify-content-center">
<span>Not found results founds with your query {{query}}</span>
</div>`; More about this into |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I think it would be useful to have more data in all templates: header, footer and notFound, to give more information to the user for better UX, for example, total results found, manage additional logic to show "see more" button depending on results found, etc... |
Beta Was this translation helpful? Give feedback.
-
for me a workaround was like the following: notFound: () => {
const query = document.querySelector('#searchInputTypeahead').value;
const slug = gen(generateSlugSearch(query), slugTypes.search);
const template = `
<div class="d-flex flex-column align-items-center justify-content-center">
<span>Aun no hemos encontrado resultados</span>
<button class="btn btn-primary my-2" type="submit" onclick="window.location.href = '${slug}'">
<div class="d-flex align-items-center">
<i class="fas fa-search pe-1"></i>
Ampliar más la búsqueda
</div>
</button>
</div>
`;
return template;
}, |
Beta Was this translation helpful? Give feedback.
for me a workaround was like the following: