I am using react-syntax-highlighter and trying to make the pr i pulled from github to look pretty but it does not work. Am I applying it wrong? Should I be applying it elsewhere?
Is there an alternative to it?
Picture of how it looks like rendering the pr from github
const renderPRs = () => {
console.log('Rendering PRs:', userPRs);
const userCreatedPRs = userPRs.filter(pr => pr.user.login === username);
return userCreatedPRs.map(pr => (
<div key={pr.id}>
<a href={pr.html_url} target="_blank" rel="noopener noreferrer">{pr.title}</a>
<p>State: {pr.state}</p>
{prDiffs[pr.number] && (
<SyntaxHighlighter language="diff" style={docco} className="diff-block">
{prDiffs[pr.number]}
</SyntaxHighlighter>
)}
</div>
));
};
…. more code here and then rendering the pr here, no tags around it or anything:
{renderPRs()}