Dynamic heading with API first letter to be Capitalised in NextJs
with Pagination count value change for text
this functionality using with Javascript not use in Css
error showing in this code
{${props.currentPath + " News"} ${props.renderPage ? '- Page ' + parseInt(props.renderPage + 1) : ''}}
New contributor
Ashok Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
Using the variable of the top in Next Js First letter Capitalize
Please try this code
let titleFirstLetter = props.currentPath;
let pageTitle = titleFirstLetter.charAt(0).toUpperCase() + titleFirstLetter.slice(1);
{`${pageTitle + " News"} ${props.renderPage ? '- Page ' + parseInt(props.renderPage + 1) : ''}`}