20211013 - 'index.js1 Warning validateDOMNesting(...) figure cannot appear as a descendant of p.'
2021-10-13 00:00:00

Untitled

Material UI的Typography的variant默认body1,也就是component为

,而

只能包含行内元素。所以将component的值改为div就可以了。

Solution:

cannot appear as a descendant of

Cool explanations:

Reference:

Why doesn’t my div inside a span work properly?