Repository navigation
|
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 |
Answered by
AlonsoK28
Feb 1, 2023
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... |
1 reply
|
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;
}, |
1 reply
Answer selected by
niketpathak
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

for me a workaround was like the following: