fix: clear selection if modal is closed through cancel button and secrets have been moved

This commit is contained in:
Scott Wilson
2025-02-03 18:44:52 -08:00
parent 92c4d83714
commit a903537441

View File

@@ -1,4 +1,4 @@
import { useMemo, useState } from "react";
import { useEffect, useMemo, useState } from "react";
import { SingleValue } from "react-select";
import { subject } from "@casl/ability";
import { IconDefinition } from "@fortawesome/free-brands-svg-icons";
@@ -236,6 +236,12 @@ const Content = ({
setMoveResults(results);
};
useEffect(() => {
return () => {
if (moveResults) onComplete();
};
}, [moveResults]);
if (moveResults) {
return (
<div className="w-full">