Accepted answer

you can put your jsx in the function `MainContent without returning anything.

To fix this write code like that:

function MainContent() {
  return (
    <put all the jsx here>

add this allowTernary comment above the ternary operator expression, to disable eslint error for that line:

/*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
drillLevel === 'area' ? getCitiesData(bubbleId) : getStatesData();
    return ;

The code in {} of then(response => {/* function body */}) is the body of a function, and then returns the result of that function.

solved by adding this to the top of the file:

/* eslint-disable */