Skip to content

Commit

Permalink
Removed declaration with any
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyco97 committed Aug 30, 2023
1 parent 71256ba commit c617db5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions components/layout/UserLastCalls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ import { CallsDate } from '../history/CallsDate'
import { CallsDestination } from '../history/CallsDestination'
import { CallsSource } from '../history/CallsSource'
import { getJSONItem, setJSONItem } from '../../lib/storage'
import { StatusTypes } from '../../theme/Types'

interface LastCallTypes extends CallTypes {
avatar?: string
presence?: StatusTypes | undefined
}

type LastCallsTypes = LastCallTypes[]

export const UserLastCalls = () => {
const { t } = useTranslation()
const operators = useSelector((state: RootState) => state.operators.operators)
const username = useSelector((state: RootState) => state.user.username)
const [lastCalls, setLastCalls] = useState<any>()
const [lastCalls, setLastCalls] = useState<LastCallsTypes>()
const firstLoadedRef = useRef<boolean>(false)
const [isLoading, setIsLoading] = useState<boolean>(false)
const updateIntervalId = useRef<ReturnType<typeof setInterval>>()
Expand All @@ -47,7 +55,7 @@ export const UserLastCalls = () => {
[username],
)

const getLastCallsUsername = (callsData: any) => {
const getLastCallsUsername = (callsData: CallTypes[]) => {
if (callsData) {
const updatedCalls = callsData.map((call: CallTypes) => {
let callName =
Expand Down

0 comments on commit c617db5

Please sign in to comment.