Skip to content

Commit

Permalink
feat: disable Record button in MarkInputPanel if no mark or feedback …
Browse files Browse the repository at this point in the history
…input available
  • Loading branch information
procaconsul committed Jun 25, 2024
1 parent 790bad3 commit 85dc888
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/MarkingPage/MarkInputPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ const MarkInputPanel: FC<MarkInputPanelProps> = ({
placeholder="Mark"
className={'mark-field'}
/>
<Button color="gray" radius="none" className={'mark-button'} onClick={handleSave}>
<Button
disabled={isEmpty(newMark.mark) && isEmpty(newMark.feedback)}
color="amber"
radius="none"
className={'mark-button'}
onClick={handleSave}
>
Record
</Button>
</Grid>
Expand Down

0 comments on commit 85dc888

Please sign in to comment.