Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Item = ({ state, item }) => {
const { author } = state.frontity;
const date = new Date(item.date);
const dateFormatted = `${date.getDate()} / ${date.getMonth()} / ${date.getFullYear()}`
const excerptWithoutParragraph = item.excerpt.rendered.replace(/<\/?p>/g,'');
const excerptPlain = excerptWithoutParragraph.replace('[…]', '… ');
const titleId = nextId('title-');
const readmoreId = nextId('readmore-');
return (
<article>
<title id="{titleId}">
</Link>
<Postdetails>
<DateFormat date={item.date} />
</Postdetails>
<p>
<span dangerouslySetInnerHTML={{__html: excerptPlain} } />
<Link link={item.link} id={readmoreId} ariaLabelledby={readmoreId + ' ' + titleId }>Leer más</Link>
</p>
</Article>
);
};</title></article>
const Item = ({ state, item }) => {
const { author } = state.frontity;
const date = new Date(item.date);
const dateFormatted = `${date.getDate()} / ${date.getMonth()} / ${date.getFullYear()}`
const excerptWithoutParragraph = item.excerpt.rendered.replace(/<\/?p>/g,'');
const excerptPlain = excerptWithoutParragraph.replace('[…]', '… ');
const titleId = nextId('title-');
const readmoreId = nextId('readmore-');
return (
<article>
<title id="{titleId}">
</Link>
<Postdetails>
<DateFormat date={item.date} />
</Postdetails>
<p>
<span dangerouslySetInnerHTML={{__html: excerptPlain} } />
<Link link={item.link} id={readmoreId} ariaLabelledby={readmoreId + ' ' + titleId }>Leer más</Link>
</p>
</Article>
);</title></article>