diff --git a/.eslintrc.js b/.eslintrc.js index bf7bb15cb14..53796782da5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -57,7 +57,6 @@ module.exports = { '@typescript-eslint/no-unused-vars': [ 'warn', { - args: 'none', varsIgnorePattern: '^_', ignoreRestSiblings: true, }, diff --git a/packages/desktop-client/src/browser-preload.browser.js b/packages/desktop-client/src/browser-preload.browser.js index 37bd1f53719..ca5bc118d90 100644 --- a/packages/desktop-client/src/browser-preload.browser.js +++ b/packages/desktop-client/src/browser-preload.browser.js @@ -51,7 +51,7 @@ global.Actual = { window.location.reload(); }, - openFileDialog: async ({ filters = [], properties }) => { + openFileDialog: async ({ filters = [] }) => { return new Promise(resolve => { let createdElement = false; // Attempt to reuse an already-created file input. @@ -91,7 +91,7 @@ global.Actual = { .uploadFile(filename, ev.target.result) .then(() => resolve([filepath])); }; - reader.onerror = function (ev) { + reader.onerror = function () { alert('Error reading file'); }; } @@ -107,7 +107,7 @@ global.Actual = { }); }, - saveFile: (contents, defaultFilename, dialogTitle) => { + saveFile: (contents, defaultFilename) => { const temp = document.createElement('a'); temp.style = 'display: none'; temp.download = defaultFilename; @@ -121,9 +121,9 @@ global.Actual = { openURLInBrowser: url => { window.open(url, '_blank'); }, - onEventFromMain: (type, handler) => {}, + onEventFromMain: () => {}, applyAppUpdate: () => {}, - updateAppMenu: isBudgetOpen => {}, + updateAppMenu: () => {}, ipcConnect: () => {}, getServerSocket: async () => { diff --git a/packages/desktop-client/src/components/FatalError.tsx b/packages/desktop-client/src/components/FatalError.tsx index f15b6852610..ebed6c72ee6 100644 --- a/packages/desktop-client/src/components/FatalError.tsx +++ b/packages/desktop-client/src/components/FatalError.tsx @@ -131,7 +131,7 @@ function SharedArrayBufferOverride() { > setUnderstand(!understand)} + onChange={() => setUnderstand(!understand)} />{' '} I understand the risks, run Actual in the unsupported fallback mode diff --git a/packages/desktop-client/src/components/FixedSizeList.tsx b/packages/desktop-client/src/components/FixedSizeList.tsx index 2e74b00d5f8..b2257a0a099 100644 --- a/packages/desktop-client/src/components/FixedSizeList.tsx +++ b/packages/desktop-client/src/components/FixedSizeList.tsx @@ -2,7 +2,6 @@ import { createRef, PureComponent, - type ReactElement, type ReactNode, type Ref, type MutableRefObject, @@ -11,7 +10,6 @@ import { import memoizeOne from 'memoize-one'; -import { useResizeObserver } from '../hooks/useResizeObserver'; import { type CSSProperties } from '../style'; import { View } from './common/View'; @@ -20,16 +18,6 @@ const IS_SCROLLING_DEBOUNCE_INTERVAL = 150; const defaultItemKey: FixedSizeListProps['itemKey'] = (index: number) => index; -type ResizeObserverProps = { - onResize: Parameters[0]; - children: (ref: Ref) => ReactElement; -}; - -function ResizeObserver({ onResize, children }: ResizeObserverProps) { - const ref = useResizeObserver(onResize); - return children(ref); -} - type FixedSizeListProps = { className?: string; direction?: 'rtl' | 'ltr'; @@ -262,33 +250,29 @@ export class FixedSizeList extends PureComponent< const estimatedTotalSize = this.getEstimatedTotalSize(); return ( - - {headerRef => ( -
- {header} -
- {items} -
-
- )} -
+
+ {header} +
+ {items} +
+
); } @@ -305,10 +289,6 @@ export class FixedSizeList extends PureComponent< } }; - onHeaderResize = (rect: { height: number }) => { - // this.setState({ headerHeight: rect.height }); - }; - anchor() { const itemKey = this.props.itemKey || defaultItemKey; @@ -499,6 +479,7 @@ export class FixedSizeList extends PureComponent< return style; }; + // eslint-disable-next-line @typescript-eslint/no-unused-vars _getItemStyleCache = memoizeOne((_, __, ___) => ({})); _getRangeToRender() { diff --git a/packages/desktop-client/src/components/ManageRules.tsx b/packages/desktop-client/src/components/ManageRules.tsx index 6e82621f92f..0bcbfe254b4 100644 --- a/packages/desktop-client/src/components/ManageRules.tsx +++ b/packages/desktop-client/src/components/ManageRules.tsx @@ -230,7 +230,7 @@ function ManageRulesContent({ dispatch( pushModal('edit-rule', { rule, - onSave: async newRule => { + onSave: async () => { await loadRules(); setLoading(false); }, diff --git a/packages/desktop-client/src/components/accounts/Account.jsx b/packages/desktop-client/src/components/accounts/Account.jsx index 37653a025b8..85c5867206b 100644 --- a/packages/desktop-client/src/components/accounts/Account.jsx +++ b/packages/desktop-client/src/components/accounts/Account.jsx @@ -227,7 +227,7 @@ class AccountInternal extends PureComponent { } }; - const onUndo = async ({ tables, messages, undoTag }) => { + const onUndo = async ({ tables, messages }) => { await maybeRefetch(tables); // If all the messages are dealing with transactions, find the @@ -516,7 +516,7 @@ class AccountInternal extends PureComponent { }); } }, - mappedData => { + () => { return data; }, ); diff --git a/packages/desktop-client/src/components/accounts/MobileAccount.jsx b/packages/desktop-client/src/components/accounts/MobileAccount.jsx index aaaed0db57e..b8d4bb6ce77 100644 --- a/packages/desktop-client/src/components/accounts/MobileAccount.jsx +++ b/packages/desktop-client/src/components/accounts/MobileAccount.jsx @@ -43,7 +43,7 @@ const getSchedulesTransform = memoizeOne((id, hasSearch) => { }; }); -function PreviewTransactions({ accountId, children }) { +function PreviewTransactions({ children }) { const scheduleData = useCachedSchedules(); if (scheduleData == null) { diff --git a/packages/desktop-client/src/components/budget/MobileBudget.tsx b/packages/desktop-client/src/components/budget/MobileBudget.tsx index 2a426909a4c..b1b59f76c8c 100644 --- a/packages/desktop-client/src/components/budget/MobileBudget.tsx +++ b/packages/desktop-client/src/components/budget/MobileBudget.tsx @@ -408,19 +408,15 @@ function BudgetInner(props: BudgetInnerProps) { await sync(); }} > - {({ refreshing, onRefresh }) => ( + {({ onRefresh }) => ( - // } editMode={editMode} onEditMode={flag => setEditMode(flag)} onShowBudgetSummary={onShowBudgetSummary} @@ -438,9 +434,6 @@ function BudgetInner(props: BudgetInnerProps) { onBudgetAction={applyBudgetAction} onRefresh={onRefresh} onSwitchBudgetType={onSwitchBudgetType} - onSaveNotes={onSaveNotes} - onEditGroupNotes={onEditGroupNotes} - onEditCategoryNotes={onEditCategoryNotes} savePrefs={savePrefs} pushModal={pushModal} onEditGroup={onEditGroup} diff --git a/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx b/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx index 3c2251d77b3..cb75b90eef9 100644 --- a/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx +++ b/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx @@ -145,7 +145,7 @@ function BudgetCell({ }); } - function onAmountClick(e) { + function onAmountClick() { onEdit?.(categoryId); } @@ -243,7 +243,6 @@ const ExpenseCategory = memo(function ExpenseCategory({ blank, style, month, - editMode, onEdit, isEditingBudget, onEditBudget, @@ -569,7 +568,6 @@ const IncomeGroupTotals = memo(function IncomeGroupTotals({ budgeted, balance, style, - editMode, onEdit, }) { const listItemRef = useRef(); @@ -657,7 +655,6 @@ const IncomeCategory = memo(function IncomeCategory({ balance, month, style, - editMode, onEdit, onBudgetAction, isEditingBudget, @@ -1122,7 +1119,6 @@ function BudgetGroups({ export function BudgetTable({ type, categoryGroups, - categories, month, monthBounds, editMode, @@ -1143,9 +1139,6 @@ export function BudgetTable({ onBudgetAction, onRefresh, onSwitchBudgetType, - onSaveNotes, - onEditGroupNotes, - onEditCategoryNotes, savePrefs, pushModal, onEditGroup, @@ -1154,7 +1147,6 @@ export function BudgetTable({ onEditCategoryBudget, openBalanceActionMenuId, onOpenBalanceActionMenu, - ...props }) { const { width } = useResponsive(); const show3Cols = width >= 360; diff --git a/packages/desktop-client/src/components/budget/SidebarCategory.tsx b/packages/desktop-client/src/components/budget/SidebarCategory.tsx index 04bd471d24b..8ca35fde6b9 100644 --- a/packages/desktop-client/src/components/budget/SidebarCategory.tsx +++ b/packages/desktop-client/src/components/budget/SidebarCategory.tsx @@ -154,7 +154,7 @@ export function SidebarCategory({ > displayed} + formatter={() => displayed} width="flex" exposed={editing || temporary} onUpdate={value => { diff --git a/packages/desktop-client/src/components/budget/SidebarGroup.tsx b/packages/desktop-client/src/components/budget/SidebarGroup.tsx index c298e3d28e3..bbdd36b3603 100644 --- a/packages/desktop-client/src/components/budget/SidebarGroup.tsx +++ b/packages/desktop-client/src/components/budget/SidebarGroup.tsx @@ -27,7 +27,6 @@ type SidebarGroupProps = { collapsed: boolean; dragPreview?: boolean; innerRef?: ConnectDragSource; - borderColor?: string; style?: CSSProperties; onEdit?: (id: string) => void; onSave?: (group: object) => Promise; @@ -44,7 +43,6 @@ export function SidebarGroup({ dragPreview, innerRef, style, - borderColor = theme.tableBorder, onEdit, onSave, onDelete, @@ -63,7 +61,7 @@ export function SidebarGroup({ userSelect: 'none', WebkitUserSelect: 'none', }} - onClick={e => { + onClick={() => { onToggleCollapse(group.id); }} > @@ -181,7 +179,7 @@ export function SidebarGroup({ > displayed} + formatter={() => displayed} width="flex" exposed={editing} onUpdate={value => { diff --git a/packages/desktop-client/src/components/budget/index.tsx b/packages/desktop-client/src/components/budget/index.tsx index 884567a27b5..3363140e6f7 100644 --- a/packages/desktop-client/src/components/budget/index.tsx +++ b/packages/desktop-client/src/components/budget/index.tsx @@ -533,7 +533,7 @@ const RolloverBudgetSummary = memo<{ month: string }>(props => { ); }); -export function Budget(props) { +export function Budget() { const startMonth = useSelector( state => state.prefs.local['budget.startMonth'], ); diff --git a/packages/desktop-client/src/components/budget/report/BalanceTooltip.tsx b/packages/desktop-client/src/components/budget/report/BalanceTooltip.tsx index 76eddb31928..bf806d12b90 100644 --- a/packages/desktop-client/src/components/budget/report/BalanceTooltip.tsx +++ b/packages/desktop-client/src/components/budget/report/BalanceTooltip.tsx @@ -38,7 +38,7 @@ export function BalanceTooltip({ {...tooltipProps} > { + onMenuSelect={() => { onBudgetAction(monthIndex, 'carryover', { category: categoryId, flag: !carryover, diff --git a/packages/desktop-client/src/components/budget/rollover/CoverTooltip.tsx b/packages/desktop-client/src/components/budget/rollover/CoverTooltip.tsx index bd822c9cb96..2f33e371f7d 100644 --- a/packages/desktop-client/src/components/budget/rollover/CoverTooltip.tsx +++ b/packages/desktop-client/src/components/budget/rollover/CoverTooltip.tsx @@ -48,7 +48,7 @@ export function CoverTooltip({ categoryGroups={categoryGroups} value={null} openOnFocus={true} - onUpdate={id => {}} + onUpdate={() => {}} onSelect={id => setCategory(id)} inputProps={{ inputRef: node, diff --git a/packages/desktop-client/src/components/budget/rollover/TransferTooltip.tsx b/packages/desktop-client/src/components/budget/rollover/TransferTooltip.tsx index 8671a1261c7..0d27946f138 100644 --- a/packages/desktop-client/src/components/budget/rollover/TransferTooltip.tsx +++ b/packages/desktop-client/src/components/budget/rollover/TransferTooltip.tsx @@ -98,7 +98,7 @@ export function TransferTooltip({ categoryGroups={categoryGroups} value={null} openOnFocus={true} - onUpdate={id => {}} + onUpdate={() => {}} onSelect={id => setCategory(id)} inputProps={{ onEnter: submit, placeholder: '(none)' }} /> diff --git a/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx b/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx index dc66bed7a9f..209ab5e31be 100644 --- a/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx +++ b/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx @@ -35,7 +35,7 @@ export function BudgetSummary({ } = useRollover(); const [menuOpen, setMenuOpen] = useState(false); - function onMenuOpen(e) { + function onMenuOpen() { setMenuOpen(true); } diff --git a/packages/desktop-client/src/components/common/Menu.tsx b/packages/desktop-client/src/components/common/Menu.tsx index dc67988c626..27c428aa339 100644 --- a/packages/desktop-client/src/components/common/Menu.tsx +++ b/packages/desktop-client/src/components/common/Menu.tsx @@ -163,7 +163,7 @@ export function Menu({ }} onMouseEnter={() => setHoveredIndex(idx)} onMouseLeave={() => setHoveredIndex(null)} - onClick={e => + onClick={() => !item.disabled && onMenuSelect && onMenuSelect(item.name) } > diff --git a/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx b/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx index bd8d3e5d112..6a1368b5a4b 100644 --- a/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx +++ b/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx @@ -137,7 +137,7 @@ export function CategoryGroupMenu({ notes={notes?.length > 0 ? notes : 'No notes'} editable={false} focused={false} - getStyle={editable => ({ + getStyle={() => ({ ...styles.mediumText, borderRadius: 6, ...((!notes || notes.length === 0) && { diff --git a/packages/desktop-client/src/components/modals/CategoryMenu.tsx b/packages/desktop-client/src/components/modals/CategoryMenu.tsx index f42bb96904b..2e2b79181f3 100644 --- a/packages/desktop-client/src/components/modals/CategoryMenu.tsx +++ b/packages/desktop-client/src/components/modals/CategoryMenu.tsx @@ -128,7 +128,7 @@ export function CategoryMenu({ notes={originalNotes?.length > 0 ? originalNotes : 'No notes'} editable={false} focused={false} - getStyle={editable => ({ + getStyle={() => ({ borderRadius: 6, ...((!originalNotes || originalNotes.length === 0) && { justifySelf: 'center', diff --git a/packages/desktop-client/src/components/modals/EditRule.jsx b/packages/desktop-client/src/components/modals/EditRule.jsx index 661cc799e8c..4d42814e53d 100644 --- a/packages/desktop-client/src/components/modals/EditRule.jsx +++ b/packages/desktop-client/src/components/modals/EditRule.jsx @@ -122,7 +122,7 @@ export function OpSelect({ ); } -function EditorButtons({ onAdd, onDelete, style }) { +function EditorButtons({ onAdd, onDelete }) { return ( <> {onDelete && ( @@ -310,7 +310,7 @@ const actionFields = [ 'date', 'amount', ].map(field => [field, mapField(field)]); -function ActionEditor({ ops, action, editorStyle, onChange, onDelete, onAdd }) { +function ActionEditor({ action, editorStyle, onChange, onDelete, onAdd }) { const { field, op, value, type, error, inputKey = 'initial' } = action; return ( diff --git a/packages/desktop-client/src/components/modals/Notes.tsx b/packages/desktop-client/src/components/modals/Notes.tsx index e36f2315217..76516325466 100644 --- a/packages/desktop-client/src/components/modals/Notes.tsx +++ b/packages/desktop-client/src/components/modals/Notes.tsx @@ -63,7 +63,7 @@ export function Notes({ modalProps, id, name, onSave }: NotesProps) { notes={notes} editable={true} focused={true} - getStyle={editable => ({ + getStyle={() => ({ borderRadius: 6, flex: 1, minWidth: 0, diff --git a/packages/desktop-client/src/components/modals/SingleInput.tsx b/packages/desktop-client/src/components/modals/SingleInput.tsx index 8c4daef9451..89f4b334799 100644 --- a/packages/desktop-client/src/components/modals/SingleInput.tsx +++ b/packages/desktop-client/src/components/modals/SingleInput.tsx @@ -81,7 +81,7 @@ export function SingleInput({ ...styles.mediumText, flexBasis: '50%', }} - onPointerUp={e => _onSubmit(value)} + onPointerUp={() => _onSubmit(value)} > {buttonText} diff --git a/packages/desktop-client/src/components/payees/ManagePayeesWithData.jsx b/packages/desktop-client/src/components/payees/ManagePayeesWithData.jsx index 338adbb08cd..a828c5e73f2 100644 --- a/packages/desktop-client/src/components/payees/ManagePayeesWithData.jsx +++ b/packages/desktop-client/src/components/payees/ManagePayeesWithData.jsx @@ -63,7 +63,7 @@ export function ManagePayeesWithData({ initialSelectedIds }) { }; }, []); - async function onUndo({ tables, messages, meta, url }, scroll = false) { + async function onUndo({ tables, messages, meta }) { if (!tables.includes('payees') && !tables.includes('payee_mapping')) { return; } @@ -83,7 +83,7 @@ export function ManagePayeesWithData({ initialSelectedIds }) { useEffect(() => { if (lastUndoState.current) { - onUndo(lastUndoState.current, true); + onUndo(lastUndoState.current); } return listen('undo-event', onUndo); diff --git a/packages/desktop-client/src/components/reports/ChooseGraph.tsx b/packages/desktop-client/src/components/reports/ChooseGraph.tsx index a4e0b5b21bf..a3149c39119 100644 --- a/packages/desktop-client/src/components/reports/ChooseGraph.tsx +++ b/packages/desktop-client/src/components/reports/ChooseGraph.tsx @@ -26,7 +26,6 @@ type ChooseGraphProps = { graphType: string; balanceType: string; groupBy: string; - scrollWidth?: number; setScrollWidth?: (value: number) => void; months?: Month[]; viewLabels?: boolean; @@ -40,7 +39,6 @@ export function ChooseGraph({ graphType, balanceType, groupBy, - scrollWidth, setScrollWidth, months, viewLabels, @@ -139,7 +137,6 @@ export function ChooseGraph({ headerScrollRef={headerScrollRef} handleScroll={handleScroll} interval={mode === 'time' && data.monthData} - scrollWidth={scrollWidth} groupBy={groupBy} balanceType={balanceType} compact={compact} @@ -158,7 +155,6 @@ export function ChooseGraph({ - {(width, height, portalHost) => + {(width, height) => data.monthData && (
diff --git a/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx b/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx index e17171b5635..7f4f9ec3bdd 100644 --- a/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx @@ -167,7 +167,7 @@ export function BarGraph({ ...(compact && { height: 'auto' }), }} > - {(width, height, portalHost) => + {(width, height) => data[splitData] && (
diff --git a/packages/desktop-client/src/components/reports/graphs/BarLineGraph.tsx b/packages/desktop-client/src/components/reports/graphs/BarLineGraph.tsx index fe659df811b..26e823288fb 100644 --- a/packages/desktop-client/src/components/reports/graphs/BarLineGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/BarLineGraph.tsx @@ -33,10 +33,9 @@ type PayloadItem = { type CustomTooltipProps = { active?: boolean; payload?: PayloadItem[]; - label?: string; }; -const CustomTooltip = ({ active, payload, label }: CustomTooltipProps) => { +const CustomTooltip = ({ active, payload }: CustomTooltipProps) => { if (active && payload && payload.length) { return (
- {(width, height, portalHost) => + {(width, height) => graphData && (
diff --git a/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx b/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx index 6a69bb2ec9b..6fb3ebc03f2 100644 --- a/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx @@ -157,7 +157,7 @@ export function DonutGraph({ ...(compact && { height: 'auto' }), }} > - {(width, height, portalHost) => + {(width, height) => data[splitData] && (
diff --git a/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx b/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx index 4cba1f3e744..81952843991 100644 --- a/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx @@ -32,10 +32,9 @@ type PayloadItem = { type CustomTooltipProps = { active?: boolean; payload?: PayloadItem[]; - label?: string; }; -const CustomTooltip = ({ active, payload, label }: CustomTooltipProps) => { +const CustomTooltip = ({ active, payload }: CustomTooltipProps) => { if (active && payload && payload.length) { return (
- {(width, height, portalHost) => + {(width, height) => graphData && (
diff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx index 9e9eb3fadd8..f3974f7e4ec 100644 --- a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx @@ -22,16 +22,12 @@ type NetWorthGraphProps = { style?: CSSProperties; graphData; compact: boolean; - domain?: { - y?: [number, number]; - }; }; export function NetWorthGraph({ style, graphData, compact, - domain, }: NetWorthGraphProps) { const tickFormatter = tick => { return `${Math.round(tick).toLocaleString()}`; // Formats the tick values as strings with commas @@ -66,11 +62,10 @@ export function NetWorthGraph({ type CustomTooltipProps = { active?: boolean; payload?: PayloadItem[]; - label?: string; }; // eslint-disable-next-line react/no-unstable-nested-components - const CustomTooltip = ({ active, payload, label }: CustomTooltipProps) => { + const CustomTooltip = ({ active, payload }: CustomTooltipProps) => { if (active && payload && payload.length) { return (
- {(width, height, portalHost) => + {(width, height) => graphData && (
diff --git a/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx b/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx index d079a1a40e4..5f97bfcba80 100644 --- a/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx @@ -114,7 +114,7 @@ export function SankeyGraph({ style, data, compact }: SankeyProps) { ...(compact && { height: 'auto' }), }} > - {(width, height, portalHost) => ( + {width => ( - {(width, height, portalHost) => + {(width, height) => data.monthData && (
diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx index ea81dc53438..4bb20248c32 100644 --- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx @@ -9,7 +9,6 @@ import { View } from '../../../common/View'; import { Row, Cell } from '../../../table'; type ReportTableHeaderProps = { - scrollWidth?: number; groupBy: string; interval?: DataEntity[]; balanceType: string; @@ -19,7 +18,6 @@ type ReportTableHeaderProps = { }; export function ReportTableHeader({ - scrollWidth, groupBy, interval, balanceType, diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx index 784f6054e24..5153ae1b0ba 100644 --- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx @@ -15,7 +15,6 @@ import { Row, Cell } from '../../../table'; type ReportTableTotalsProps = { data: GroupedEntity; - scrollWidth?: number; balanceTypeOp: string; mode: string; monthsCount: number; @@ -26,7 +25,6 @@ type ReportTableTotalsProps = { export function ReportTableTotals({ data, - scrollWidth, balanceTypeOp, mode, monthsCount, diff --git a/packages/desktop-client/src/components/reports/reports/CashFlow.tsx b/packages/desktop-client/src/components/reports/reports/CashFlow.tsx index e1ad6356cb4..70f195efdab 100644 --- a/packages/desktop-client/src/components/reports/reports/CashFlow.tsx +++ b/packages/desktop-client/src/components/reports/reports/CashFlow.tsx @@ -110,7 +110,6 @@ export function CashFlow(): JSX.Element { conditionsOp={conditionsOp} onCondOpChange={onCondOpChange} headerPrefixItems={undefined} - selectGraph={undefined} /> 0').filter({ amount: { $gt: 0 } }), - makeQuery('amount < 0').filter({ amount: { $lt: 0 } }), + makeQuery().filter({ amount: { $gt: 0 } }), + makeQuery().filter({ amount: { $lt: 0 } }), ], data => { setData(recalculate(data, start, end, isConcise)); diff --git a/upcoming-release-notes/2256.md b/upcoming-release-notes/2256.md new file mode 100644 index 00000000000..02d56a0c79f --- /dev/null +++ b/upcoming-release-notes/2256.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [MatissJanis] +--- + +Code clean-up: removing unused variables (pt.2)