Add unique key in toc

This commit is contained in:
Defectink
2022-04-06 10:15:38 +08:00
parent 11fcb9677f
commit 35e24b45c5

View File

@ -13,13 +13,11 @@ const PostTOC: FC<Props> = ({ headings }) => {
<ul className="pl-4 border-l-4 border-gray-300"> <ul className="pl-4 border-l-4 border-gray-300">
{headings?.map((h) => ( {headings?.map((h) => (
<> <li key={h.link}>
<li> <Anchor href={h.link} external={false}>
<Anchor href={h.link} external={false}> {h.text}
{h.text} </Anchor>
</Anchor> </li>
</li>
</>
))} ))}
</ul> </ul>
</> </>