Skip to content

Commit

Permalink
fix: <p> cannot appear as a descendant of <p>.
Browse files Browse the repository at this point in the history
fix: Warning: validateDOMNesting(...): <p> cannot appear as a descendant of <p>.

In some locations we had <Typography variant=“body1”> nested inside another <Typography> this renders 2 <p> tags inside of each-other and that is not valid.
The other way around was having a <Box> that is nested inside of a Typograpühy which also seems to be not valid.
  • Loading branch information
compojoom committed Mar 11, 2024
1 parent b29dc9c commit 0b38a15
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/theme/safeTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ const createSafeTheme = (mode: PaletteMode): Theme => {
] as Shadows,
typography,
components: {
MuiTypography: {
defaultProps: {
variantMapping: {
body1: 'div',
body2: 'div',
},
},
},
MuiTableCell: {
styleOverrides: {
head: ({ theme }) => ({
Expand Down

0 comments on commit 0b38a15

Please sign in to comment.