panel-linter-fix
Some checks failed
Deploy on push / deploy (push) Failing after 2m15s

This commit is contained in:
2025-08-18 20:23:25 +03:00
parent 1b48675b92
commit e13267a868
14 changed files with 188 additions and 145 deletions

View File

@@ -96,7 +96,7 @@ const CommunityRolesModal: Component<CommunityRolesModalProps> = (props) => {
const handleRoleToggle = (roleId: string) => {
const currentRoles = userRoles()
if (currentRoles.includes(roleId)) {
setUserRoles(currentRoles.filter((r) => r !== roleId))
setUserRoles(currentRoles.filter((r) => r !== roleId))
} else {
setUserRoles([...currentRoles, roleId])
}

View File

@@ -136,7 +136,7 @@ const InviteEditModal: Component<InviteEditModalProps> = (props) => {
<input
type="number"
value={formData().inviter_id}
onInput={(e) => updateField('inviter_id', Number.parseInt(e.target.value) || 0)}
onInput={(e) => updateField('inviter_id', Number.parseInt(e.target.value, 10) || 0)}
class={`${formStyles.input} ${errors().inviter_id ? formStyles.error : ''} ${!isCreating() ? formStyles.disabled : ''}`}
placeholder="1"
required
@@ -165,7 +165,7 @@ const InviteEditModal: Component<InviteEditModalProps> = (props) => {
<input
type="number"
value={formData().author_id}
onInput={(e) => updateField('author_id', Number.parseInt(e.target.value) || 0)}
onInput={(e) => updateField('author_id', Number.parseInt(e.target.value, 10) || 0)}
class={`${formStyles.input} ${errors().author_id ? formStyles.error : ''} ${!isCreating() ? formStyles.disabled : ''}`}
placeholder="2"
required
@@ -194,7 +194,7 @@ const InviteEditModal: Component<InviteEditModalProps> = (props) => {
<input
type="number"
value={formData().shout_id}
onInput={(e) => updateField('shout_id', Number.parseInt(e.target.value) || 0)}
onInput={(e) => updateField('shout_id', Number.parseInt(e.target.value, 10) || 0)}
class={`${formStyles.input} ${errors().shout_id ? formStyles.error : ''} ${!isCreating() ? formStyles.disabled : ''}`}
placeholder="123"
required

View File

@@ -91,7 +91,7 @@ export default function TopicEditModal(props: TopicEditModalProps) {
* Обработка изменения выбора родительских топиков из таблеточек
*/
const handleParentSelectionChange = (selectedIds: string[]) => {
const parentIds = selectedIds.map((id) => Number.parseInt(id))
const parentIds = selectedIds.map((id) => Number.parseInt(id, 10))
setFormData((prev) => ({
...prev,
parent_ids: parentIds

View File

@@ -204,7 +204,7 @@ const TopicHierarchyModal = (props: TopicHierarchyModalProps) => {
// Добавляем в список изменений
setChanges((prev) => [
...prev.filter((c) => c.topicId !== selectedId),
...prev.filter((c) => c.topicId !== selectedId),
{
topicId: selectedId,
newParentIds,

View File

@@ -130,7 +130,7 @@ const TopicMergeModal: Component<TopicMergeModalProps> = (props) => {
*/
const handleTargetTopicChange = (e: Event) => {
const target = e.target as HTMLSelectElement
const topicId = target.value ? Number.parseInt(target.value) : null
const topicId = target.value ? Number.parseInt(target.value, 10) : null
setTargetTopicId(topicId)
// Убираем выбранную целевую тему из исходных тем