AdvancedSettingsComponent small fix

master
Tudor Stanciu 2021-05-16 18:30:39 +03:00
parent 3d247e903d
commit d871b01436
1 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,11 @@ import ExceptionsCard from "../exceptions/ExceptionsCard";
import ChangePointsCard from "../changePoints/ChangePointsCard";
const AdvancedSettingsComponent = ({ data }) => {
const spaceBetweenCards = data && data.exceptions && data.changePoints;
const spaceBetweenCards =
data &&
data.exceptions &&
data.changePoints &&
data.changePoints.length > 0;
return (
<>
{data && data.exceptions && (
@ -12,7 +16,7 @@ const AdvancedSettingsComponent = ({ data }) => {
)}
{spaceBetweenCards && <br />}
{data && data.changePoints && (
{data && data.changePoints && data.changePoints.length > 0 && (
<ChangePointsCard changePoints={data.changePoints} />
)}
</>