Skip to content

Commit

Permalink
Update CreateRequest.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ElyasMehraein committed May 1, 2024
1 parent 5b50989 commit 0d0f652
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/templates/index/Requests/CreateRequest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import CircularProgress from '@mui/material/CircularProgress';


export default function CreateRequest({ fabHandler, user, distinctGuilds }) {
const [signButtonDisabled, setSignButtonDisabled] = useState(false)
const [signButtonDisabled, setSignButtonDisabled] = useState(true)

// Snackbar
const [snackbarOpen, setSnackbarOpen] = useState(false)
Expand All @@ -51,7 +51,7 @@ export default function CreateRequest({ fabHandler, user, distinctGuilds }) {
};
const handleOpen = () => {
setOpen(true);
setSignButtonDisabled(true)
setSignButtonDisabled(false)
createThisRequest(requestBox)
};
//
Expand Down Expand Up @@ -163,9 +163,9 @@ export default function CreateRequest({ fabHandler, user, distinctGuilds }) {
</Button>
<Box style={{ flexGrow: 1 }}></Box>
<Button
disabled={signButtonDisabled}
color="success" variant="outlined" endIcon={<SendIcon />}
onClick={() => handleOpen() }
disabled={!(guild && title && message && signButtonDisabled)}
color="success" variant="outlined" endIcon={<SendIcon />}
onClick={() => handleOpen()}
>
تایید
</Button>
Expand All @@ -176,7 +176,7 @@ export default function CreateRequest({ fabHandler, user, distinctGuilds }) {
<Backdrop
sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
open={open}
// onClick={handleClose}
// onClick={handleClose}
>
<CircularProgress color="inherit" />
</Backdrop>
Expand Down

0 comments on commit 0d0f652

Please sign in to comment.