We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa16948 commit 57c1e76Copy full SHA for 57c1e76
1 file changed
web/src/features/terraform/Terraform.tsx
@@ -7,6 +7,7 @@ import { Link, Outlet } from "react-router-dom";
7
8
const Terraform = () => {
9
const { endpoint, isSuccess } = useGptStore((s) => s.generatorQuery);
10
+ const setGeneratorQuery = useGptStore((s) => s.setGeneratorQuery);
11
12
const downloadRef = useRef<HTMLAnchorElement>(null);
13
@@ -17,13 +18,15 @@ const Terraform = () => {
17
18
if (downloadRef.current) {
19
downloadRef.current.href = Endpoints.DOWNLOAD_LINK;
20
downloadRef.current.download = "media";
21
+ downloadRef.current.target = "_blank";
22
downloadRef.current.click();
23
}
24
}, [isSuccess, endpoint]);
25
26
useEffect(() => {
27
if (isSuccess) {
28
downloadFile();
29
+ setGeneratorQuery(false, "");
30
31
32
0 commit comments