{ const res = await updateChannelById(localStorage.token, channel.id, { name, access_control }).catch((error) => { toast.error(error.message); }); if (res) { toast.success($i18n.t('Channel updated successfully')); } onUpdate(); }} />