Skip to content

Commit

Permalink
[Feedback] Update modal button disabling logic
Browse files Browse the repository at this point in the history
  • Loading branch information
rikurauhala committed Nov 12, 2024
1 parent 73ff9f5 commit b3f7ccc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions services/frontend/src/pages/Feedback/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,16 @@ export const Feedback = () => {
Sending feedback to Toska
</Typography>
<Box display="flex" justifyContent="space-between">
<Button onClick={() => setModalOpen(false)}>Cancel</Button>
<Button color="primary" disabled={isLoading} endIcon={<Send />} onClick={handleSubmit} variant="contained">
<Button disabled={isLoading} onClick={() => setModalOpen(false)}>
Cancel
</Button>
<Button
color="primary"
disabled={!feedback.trim().length || isLoading}
endIcon={<Send />}
onClick={handleSubmit}
variant="contained"
>
Send
</Button>
</Box>
Expand Down

0 comments on commit b3f7ccc

Please sign in to comment.