In Home.js I have the following code
<div id="sub-container">
...
</div>
and in home.css I have the following code
#sub-container {
... // A lot of css
}
I want to conditionally add one value to the css. The only solution I found is to create a new block and add the line there
{condition ? (<div id="sub-container">) : (<div id="sub-container-2">)
#sub-container-2 {
... // A lot of css
justify-content: flex-end;
}
Is there another solution to optimize the code?