Make about optional for folds
This commit is contained in:
parent
d2e78eb5de
commit
6696ac2a15
|
@ -30,9 +30,8 @@ export const createFold = functions.runWith({ minInstances: 1 }).https.onCall(
|
||||||
|
|
||||||
name = name.trim().slice(0, 140)
|
name = name.trim().slice(0, 140)
|
||||||
|
|
||||||
if (!about || typeof about !== 'string')
|
if (typeof about !== 'string')
|
||||||
return { status: 'error', message: 'About must be a non-empty string' }
|
return { status: 'error', message: 'About must be a string' }
|
||||||
|
|
||||||
about = about.trim().slice(0, 140)
|
about = about.trim().slice(0, 140)
|
||||||
|
|
||||||
if (!_.isArray(tags))
|
if (!_.isArray(tags))
|
||||||
|
|
|
@ -57,7 +57,7 @@ export function CreateFoldButton() {
|
||||||
}}
|
}}
|
||||||
submitBtn={{
|
submitBtn={{
|
||||||
label: 'Create',
|
label: 'Create',
|
||||||
className: clsx(name && about ? 'btn-primary' : 'btn-disabled'),
|
className: clsx(name ? 'btn-primary' : 'btn-disabled'),
|
||||||
}}
|
}}
|
||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
>
|
>
|
||||||
|
@ -95,7 +95,7 @@ export function CreateFoldButton() {
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
placeholder="Short description (140 characters max)"
|
placeholder="Short description (140 characters max, optional)"
|
||||||
className="input input-bordered resize-none"
|
className="input input-bordered resize-none"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
value={about}
|
value={about}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user