@@ -2,7 +2,7 @@ import React, { useCallback, useState, useRef } from 'react';
22import moment , { Moment } from 'moment' ;
33import { useSelector , useDispatch } from 'react-redux' ;
44import { type AppDispatch , type Transaction , type Category } from '../types/redux' ;
5- import type { TransactionGroup } from '../types/app' ;
5+ import type { TransactionGroup , DisplayTransaction , DisplayTransactionGroup } from '../types/app' ;
66import Link from 'next/link' ;
77import { createSearchAction } from 'redux-search' ;
88import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' ;
@@ -37,9 +37,8 @@ export default function Transactions() {
3737 return obj ;
3838 } , { } ) ;
3939
40- // eslint-disable-next-line @typescript-eslint/no-explicit-any
41- let transactionsData : any [ ] = state . transactions . data
42- . map ( ( t : Transaction ) => {
40+ let transactionsData : DisplayTransaction [ ] = state . transactions . data
41+ . map ( ( t : Transaction ) : DisplayTransaction => {
4342 return {
4443 categoryGuess : ( t . category . guess && categoriesObj [ t . category . guess ] ) || null ,
4544 categoryConfirmed : ( t . category . confirmed && categoriesObj [ t . category . confirmed ] ) || null ,
@@ -55,8 +54,7 @@ export default function Transactions() {
5554
5655 // Create an ID -> transactions mapping for easier tooltip'ing.
5756 const transactionGroupsObj = Object . entries ( state . transactions . groups || { } )
58- // eslint-disable-next-line @typescript-eslint/no-explicit-any
59- . reduce ( ( obj : Record < string , { groupId : string ; linkedTransactions : any [ ] } > , [ groupId , group ] : [ string , TransactionGroup ] ) => {
57+ . reduce ( ( obj : Record < string , DisplayTransactionGroup > , [ groupId , group ] : [ string , TransactionGroup ] ) => {
6058 obj [ group . primaryId ] = {
6159 groupId,
6260 linkedTransactions : group . linkedIds . map ( ( id : string ) => transactionsData [ reverseTransactionLookup [ id ] ] )
0 commit comments