fix(ui): fix button disable
This commit is contained in:
parent
83050e63ec
commit
61fde0732f
1 changed files with 3 additions and 1 deletions
|
|
@ -60,6 +60,8 @@ function CreateNote({
|
|||
};
|
||||
|
||||
const onSubmit = () => {
|
||||
if (text === '') return;
|
||||
|
||||
const note: WriteNote = {
|
||||
message: text,
|
||||
tag,
|
||||
|
|
@ -183,7 +185,7 @@ function CreateNote({
|
|||
</div>
|
||||
|
||||
<div className="flex">
|
||||
<Button variant="primary" className="mr-4" onClick={onSubmit}>
|
||||
<Button variant="primary" className="mr-4" disabled={text === ''} onClick={onSubmit}>
|
||||
Add Note
|
||||
</Button>
|
||||
<div className="flex items-center cursor-pointer" onClick={() => setPublic(!isPublic)}>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue