🐛 Anchoring popup disappear after 2 gifs occurence

This commit is contained in:
Maxime Lalo 2023-04-26 11:00:40 +02:00
parent 18808169bd
commit 889e14a451

View File

@ -1,4 +1,5 @@
import "reflect-metadata"; import "reflect-metadata";
import LeftArrowIcon from "@Assets/Icons/left-arrow.svg"; import LeftArrowIcon from "@Assets/Icons/left-arrow.svg";
import RightArrowIcon from "@Assets/Icons/right-arrow.svg"; import RightArrowIcon from "@Assets/Icons/right-arrow.svg";
import ValidateAnchoringGif from "@Front/Assets/images/validate_anchoring.gif"; import ValidateAnchoringGif from "@Front/Assets/images/validate_anchoring.gif";
@ -18,7 +19,6 @@ import React from "react";
import BasePage from "../../Base"; import BasePage from "../../Base";
import classes from "./classes.module.scss"; import classes from "./classes.module.scss";
type IProps = {}; type IProps = {};
type IPropsClass = { type IPropsClass = {
documentsList: Document[]; documentsList: Document[];
@ -74,7 +74,10 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
</Typography> </Typography>
<div className={classes["document-container"]}> <div className={classes["document-container"]}>
{this.props.documentsList.length > 1 && ( {this.props.documentsList.length > 1 && (
<div className={classes["arrow-container"]} onClick={this.goToPrevious} data-disabled={(!this.hasPrevious()).toString()}> <div
className={classes["arrow-container"]}
onClick={this.goToPrevious}
data-disabled={(!this.hasPrevious()).toString()}>
<Image src={LeftArrowIcon} alt="left arrow" /> <Image src={LeftArrowIcon} alt="left arrow" />
</div> </div>
)} )}
@ -84,7 +87,10 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
))} ))}
</div> </div>
{this.props.documentsList.length > 1 && ( {this.props.documentsList.length > 1 && (
<div className={classes["arrow-container"]} onClick={this.goToNext} data-disabled={(!this.hasNext()).toString()}> <div
className={classes["arrow-container"]}
onClick={this.goToNext}
data-disabled={(!this.hasNext()).toString()}>
<Image src={RightArrowIcon} alt="right arrow" /> <Image src={RightArrowIcon} alt="right arrow" />
</div> </div>
)} )}
@ -202,6 +208,19 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
this.setState({ this.setState({
hasValidateAnchoring: true, hasValidateAnchoring: true,
}); });
const timeoutDelay = 9800;
setTimeout(() => {
this.setState({
isValidateModalVisible: false,
});
}, timeoutDelay);
setTimeout(() => {
this.setState({
hasValidateAnchoring: false,
});
}, timeoutDelay + 1000);
} }
private onRefuseTextChange(e: React.ChangeEvent<HTMLInputElement>) { private onRefuseTextChange(e: React.ChangeEvent<HTMLInputElement>) {