mirror of
https://github.com/Permissionless-Software-Foundation/bch-dex-taker-v2.git
synced 2026-09-21 16:52:01 -07:00
fix(modal): preventing accidental close of startup modal
This commit is contained in:
Generated
+109
-483
File diff suppressed because it is too large
Load Diff
+12
-2
@@ -115,7 +115,12 @@ class App extends React.Component {
|
|||||||
|
|
||||||
{
|
{
|
||||||
this.state.showStartModal
|
this.state.showStartModal
|
||||||
? <UninitializedView modalBody={this.state.modalBody} hideSpinner={this.state.hideSpinner} appData={appData} />
|
? <UninitializedView
|
||||||
|
modalBody={this.state.modalBody}
|
||||||
|
hideSpinner={this.state.hideSpinner}
|
||||||
|
appData={appData}
|
||||||
|
denyClose={this.state.showStartModal}
|
||||||
|
/>
|
||||||
: <InitializedView wallet={this.state.wallet} menuState={this.state.menuState} appData={appData} />
|
: <InitializedView wallet={this.state.wallet} menuState={this.state.menuState} appData={appData} />
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +161,12 @@ function UninitializedView (props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<WaitingModal heading={heading} body={props.modalBody} hideSpinner={props.hideSpinner} />
|
<WaitingModal
|
||||||
|
heading={heading}
|
||||||
|
body={props.modalBody}
|
||||||
|
hideSpinner={props.hideSpinner}
|
||||||
|
denyClose={props.denyClose}
|
||||||
|
/>
|
||||||
|
|
||||||
{
|
{
|
||||||
_this.state.asyncInitFinished
|
_this.state.asyncInitFinished
|
||||||
|
|||||||
@@ -11,7 +11,16 @@ import { Container, Row, Col, Modal, Spinner } from 'react-bootstrap'
|
|||||||
function ModalTemplate (props) {
|
function ModalTemplate (props) {
|
||||||
const [show, setShow] = useState(true)
|
const [show, setShow] = useState(true)
|
||||||
|
|
||||||
const handleClose = () => setShow(false)
|
const handleClose = () => {
|
||||||
|
console.log(`props.denyClose: ${props.denyClose}`)
|
||||||
|
if (props.denyClose) return
|
||||||
|
|
||||||
|
setShow(false)
|
||||||
|
|
||||||
|
if (props.closeFunc) {
|
||||||
|
props.closeFunc()
|
||||||
|
}
|
||||||
|
}
|
||||||
// const handleShow = () => setShow(true)
|
// const handleShow = () => setShow(true)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user