Don't force full reload to show success screen
This commit is contained in:
parent
e0f2a79d70
commit
dbf64347be
@ -60,11 +60,6 @@ export default function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (sessionStorage.getItem("REPORT_SUCCESS")) {
|
|
||||||
sessionStorage.removeItem("REPORT_SUCCESS");
|
|
||||||
return setShowSuccess(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
setSupportsRequestStreams(
|
setSupportsRequestStreams(
|
||||||
(() => {
|
(() => {
|
||||||
let duplexAccessed = false;
|
let duplexAccessed = false;
|
||||||
@ -241,6 +236,9 @@ export default function () {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// @ts-expect-error
|
||||||
|
turnstile.reset();
|
||||||
|
|
||||||
return toast({
|
return toast({
|
||||||
description: "Failed to upload file",
|
description: "Failed to upload file",
|
||||||
isClosable: true,
|
isClosable: true,
|
||||||
@ -257,7 +255,7 @@ export default function () {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
});
|
});
|
||||||
|
|
||||||
sessionStorage.setItem("REPORT_SUCCESS", "1");
|
setShowSuccess(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user