Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
majkshkurti committed Oct 17, 2024
1 parent f6547f5 commit cbf6e5d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ const Buffer = ({ onBack, onClose }: IndicatorBaseProps) => {
});
const dispatch = useAppDispatch();
const runningJobIds = useAppSelector((state) => state.jobs.runningJobIds);
const isValid = useMemo(() => {
return true;
}, []);

const [bufferLayer, setBufferLayer] = useState<SelectorItem | undefined>(undefined);
const [distance, setDistance] = useState<number>(bufferDefaults.default_distance);
const [steps, setSteps] = useState<SelectorItem | undefined>({
Expand All @@ -56,6 +54,10 @@ const Buffer = ({ onBack, onClose }: IndicatorBaseProps) => {
const { scenarioItems } = useScenarioItems(projectId as string);
const [selectedScenario, setSelectedScenario] = useState<SelectorItem | undefined>(undefined);

const isValid = useMemo(() => {
return !!bufferLayer && distance > 0;
}, [bufferLayer, distance]);

useEffect(() => {
if (!isPolygonUnion) {
setIsPolygonDifference(false);
Expand Down

0 comments on commit cbf6e5d

Please sign in to comment.