From 636090a3c256a451d411cf67b9676a64755c1d2d Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Thu, 26 Sep 2024 22:44:30 -0700 Subject: [PATCH] Fix typecheck error --- .../budget/BalanceWithCarryover.tsx | 22 ++++++++--------- .../envelope/EnvelopeBudgetComponents.tsx | 24 ++++++++----------- .../tracking/TrackingBudgetComponents.tsx | 18 +++++++------- .../src/components/reports/LegendItem.tsx | 3 +-- 4 files changed, 29 insertions(+), 38 deletions(-) diff --git a/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx b/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx index 17e709f1306..feeb7ae0d54 100644 --- a/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx +++ b/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx @@ -7,7 +7,7 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; -import { css } from 'glamor'; +import { css } from '@emotion/css'; import { useFeatureFlag } from '../../hooks/useFeatureFlag'; import { SvgArrowThinRight } from '../../icons/v1'; @@ -124,18 +124,16 @@ export function BalanceWithCarryover({ const getDefaultClassName = useCallback( (balanceValue: number) => - String( - css({ - ...getBalanceAmountStyle(balanceValue), - overflow: 'hidden', - textOverflow: 'ellipsis', - textAlign: 'right', - ...(!isDisabled && { - cursor: 'pointer', - }), - ':hover': { textDecoration: 'underline' }, + css({ + ...getBalanceAmountStyle(balanceValue), + overflow: 'hidden', + textOverflow: 'ellipsis', + textAlign: 'right', + ...(!isDisabled && { + cursor: 'pointer', }), - ), + ':hover': { textDecoration: 'underline' }, + }), [getBalanceAmountStyle, isDisabled], ); diff --git a/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx b/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx index e0d1f23c7c4..7611fa306dd 100644 --- a/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx +++ b/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx @@ -6,7 +6,7 @@ import React, { useState, } from 'react'; -import { css } from 'glamor'; +import { css } from '@emotion/css'; import { envelopeBudget } from 'loot-core/src/client/queries'; import { evalArithmetic } from 'loot-core/src/shared/arithmetic'; @@ -367,13 +367,11 @@ export const ExpenseCategoryMonth = memo(function ExpenseCategoryMonth({ {props => ( )} @@ -482,12 +480,10 @@ export function IncomeCategoryMonth({ {props => ( )} diff --git a/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx b/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx index adc57470e17..375ed597910 100644 --- a/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx +++ b/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx @@ -8,7 +8,7 @@ import React, { } from 'react'; import { Trans } from 'react-i18next'; -import { css } from 'glamor'; +import { css } from '@emotion/css'; import { trackingBudget } from 'loot-core/src/client/queries'; import { evalArithmetic } from 'loot-core/src/shared/arithmetic'; @@ -378,15 +378,13 @@ export const CategoryMonth = memo(function CategoryMonth({ {props => ( )} diff --git a/packages/desktop-client/src/components/reports/LegendItem.tsx b/packages/desktop-client/src/components/reports/LegendItem.tsx index 8d17d9dfc64..80bb8c38ffa 100644 --- a/packages/desktop-client/src/components/reports/LegendItem.tsx +++ b/packages/desktop-client/src/components/reports/LegendItem.tsx @@ -1,6 +1,5 @@ -import React from 'react'; +import React, { CSSProperties } from 'react'; -import { type CSSProperties } from '../../style/types'; import { Text } from '../common/Text'; import { View } from '../common/View';