You're trying to return two divs from the function. In the docs it says:
Currently, in a component's render, you can only return one node; if you have, say, a list of divs to return, you must wrap your components within a div, span or any other component.
Don't forget that JSX compiles into regular js; returning two functions doesn't really make syntactic sense. Likewise, don't put more than one child in a ternary.
So you can fix it by wrapping your two root divs in a single div; or moving your second root div (with the buttons) into the first one.