andi 1 рік тому
батько
коміт
9195baf811
2 змінених файлів з 8 додано та 3 видалено
  1. 1 0
      components/Layout/Header.js
  2. 7 3
      pages/pt/pemantauan.js

+ 1 - 0
components/Layout/Header.js

@@ -63,6 +63,7 @@ class Header extends Component {
 		await logout(_csrf);
 		this.props.tokenNull();
 		this.props.userNull();
+		localStorage.removeItem("closeverif");
 
 		location.href='/app'
 		// Router.push({ pathname: "/app" });

+ 7 - 3
pages/pt/pemantauan.js

@@ -25,7 +25,8 @@ class Pemantauan extends Component {
 			otpClose: false,
 			modalOTP: false,
 			otp: "",
-			phone: ""
+			phone: "",
+			// closeVerifikasi:false,
 		};
 	}
 
@@ -35,14 +36,16 @@ class Pemantauan extends Component {
 		const pt = await getPT(token);
 		const kontakPT = await getkontakpt(token);
 		this.setState({ log, pt, kontakPT });
-		if (kontakPT=== undefined) {
+		const closeverif = localStorage.getItem(("closeverif"))
+		if (kontakPT=== undefined && closeverif === null) {
 			this.setState({modalPhone:true})
 		}
 
 	};
 	otpClose = () => {
-		// return location.href = '/pt/pemantauan';
+		// return location.href = '/pt/pemantauan';71
 		this.setState({ modalOTP: false, modalPhone: false })
+		localStorage.setItem("closeverif", "true");
 	}
 	handleSubmitTelepon = async () => {
 		const { token } = this.props
@@ -67,6 +70,7 @@ class Pemantauan extends Component {
 	}
 	render() {
 		const { log, pt } = this.state;
+		
 		return (
 			<ContentWrapper unwrap>
 				{this.state.kontakPT === undefined &&