NathanPB / rust-toolbox

Rust Toolbox is a web application that aims to help Rust players with they daily ingame needs.
https://rusttoolbox.nathanpb.dev
GNU General Public License v3.0
0 stars 0 forks source link

Server on Server List Item has Badge inside <p> tag #13

Closed NathanPB closed 5 years ago

NathanPB commented 5 years ago

Error occurring here: https://github.com/NathanPB/rust-toolbox/blob/8a30db0d8c9cb24ea3d90dbfda21910f48b89383/src/components/views/ServerList.js#L109

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
    in div (at Badge.js:8)
    in Badge (at ServerList.js:135)
    in div (at ServerList.js:127)
    in p (created by Typography)
    in Typography (created by WithStyles(Typography))
    in WithStyles(Typography) (created by Context.Consumer)
    in div (created by Context.Consumer)
    in ListItemText (created by WithStyles(ListItemText))
    in WithStyles(ListItemText) (at ServerList.js:113)
    in div (created by Context.Consumer)
    in li (created by Context.Consumer)
    in MergeListContext (created by ListItem)
    in ListItem (created by WithStyles(ListItem))
    in WithStyles(ListItem) (at ServerList.js:110)
    in div (created by Infinite)
    in div (created by Infinite)
    in Infinite (at ServerList.js:194)
    in div (at ServerList.js:193)
    in div (created by AutoSizer)
    in AutoSizer (at ServerList.js:189)
    in div (at Page.js:67)
    in div (at Page.js:65)
    in ServerList (created by Context.Consumer)
    in Route (at App.js:19)
    in Switch (at App.js:17)
    in Router (created by BrowserRouter)
    in BrowserRouter (at App.js:16)
    in App (at src/index.js:7)

I'ts probably a better idea to rewrite the list item into a new component

NathanPB commented 5 years ago

Fixed in 472ca1080d5f012b6590f080f5f72214e40fa5ad