refac: channel name
This commit is contained in:
@@ -55,6 +55,12 @@
|
|||||||
|
|
||||||
const submitHandler = async () => {
|
const submitHandler = async () => {
|
||||||
loading = true;
|
loading = true;
|
||||||
|
if (name.length > 128) {
|
||||||
|
toast.error($i18n.t('Channel name must be less than 128 characters'));
|
||||||
|
loading = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await onSubmit({
|
await onSubmit({
|
||||||
type: type,
|
type: type,
|
||||||
name: name.replace(/\s/g, '-'),
|
name: name.replace(/\s/g, '-'),
|
||||||
@@ -210,6 +216,7 @@
|
|||||||
placeholder={`${$i18n.t('new-channel')}`}
|
placeholder={`${$i18n.t('new-channel')}`}
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
required={type !== 'dm'}
|
required={type !== 'dm'}
|
||||||
|
max="100"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user