MSP-3229 replace part of 'any'

This commit is contained in:
Anastasiia committed 2024-05-13 11:16:26 +03:00
1 parent 1b5570ad0d
commit 775062a509
4 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@ import {
ProfileOutlined
} from '@ant-design/icons'
import { ConfigProvider, Layout, Menu, Spin } from 'antd'
import type { MenuProps } from 'antd'
import { useContext, useEffect, useState } from 'react'
import { Navigate, Outlet, useLocation, useNavigate } from 'react-router-dom'
@@ -166,7 +167,7 @@ const LayoutComponent = () => {
}
}, [location])
const handlerOnClickMenu = ({ key }: any): void => {
const handlerOnClickMenu: MenuProps['onClick'] = ({ key }): void => {
switch (key) {
case MenuItemKeysType.logout: {
logoutUser()
+1 -1
View File
@@ -61,7 +61,7 @@ const LoginPage = () => {
navigate(redirectUrl, { replace: true })
localStorage.removeItem('redirectUrl')
})
.catch((err: any) => handleError(err))
.catch((err: AxiosError<MSPError>) => handleError(err))
}
const renderInternalAuthForm = () => {
+1 -1
View File
@@ -111,7 +111,7 @@ const RolesPage = () => {
})
}
const handleRemoveRole = (id: any) => {
const handleRemoveRole = (id: string) => {
const idAsNumber = parseInt(id, 10)
removeRole(idAsNumber)
.unwrap()
+1 -1
View File
@@ -105,7 +105,7 @@ const UsersPage = () => {
dataIndex: 'roles',
key: 'roles',
render: (values: number[]) => {
const labels: any[] = []
const labels: string[] = []
values.forEach((value: number) => {
const roleLabel = roles?.find((el) => el.id === value)
if (roleLabel) {