Skip to content

Commit

Permalink
Reolved Conversations, Updated and Improved
Browse files Browse the repository at this point in the history
  • Loading branch information
rahil1202 committed Apr 24, 2024
1 parent bcac40d commit f8c0506
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import {
OutlinedInput,
MenuItem,
ListItemText,
IconButton
IconButton,
Modal
} from '@mui/material'

import ConfigurableValues from '../../config/constants'
Expand Down Expand Up @@ -71,6 +72,11 @@ const CreateRestaurant = props => {
// const [shopType, setShopType] = useState(SHOP_TYPE.RESTAURANT)
const [errors, setErrors] = useState('')
const [success, setSuccess] = useState('')
const [open, setOpen] = React.useState(true)

const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false);

const onCompleted = data => {
console.log('on complete here')
setNameError(null)
Expand Down Expand Up @@ -249,10 +255,7 @@ const CreateRestaurant = props => {
setImgUrl('')
}

const { onClose } = props // Extracting onClose from props
const handleClose = () => {
onClose(); // Calling onClose to close the popup
};


const handleContainerClick = (e) => {
e.stopPropagation();
Expand All @@ -272,6 +275,7 @@ const CreateRestaurant = props => {


return (
<Modal open={open} onClose={handleClose} disableBackdropClick>
<Box container className={classes.container} onClick={handleContainerClick}>
<Box style={{ alignItems: 'start' }} className={classes.flexRow}>
<Box item className={classes.heading}>
Expand Down Expand Up @@ -597,6 +601,7 @@ const CreateRestaurant = props => {
</Box>
</Box>
</Box>
</Modal>
)
}
export default withTranslation()(CreateRestaurant)

0 comments on commit f8c0506

Please sign in to comment.