Skip to content

Commit

Permalink
remove Trans nesting in favour of typecast
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-fidd committed Jan 2, 2025
1 parent 05bb2ed commit 30bf0c6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
20 changes: 15 additions & 5 deletions packages/desktop-client/src/components/LoggedInUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,12 @@ export function LoggedInUser({
userData?.displayName &&
!hasSyncedPrefs && (
<small>
(<Trans>logged in as:</Trans> <span>{userData?.displayName}</span>)
(
<Trans>
logged in as:{' '}
<span>{{ userName: userData?.displayName } as any}</span>

Check failure on line 211 in packages/desktop-client/src/components/LoggedInUser.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
</Trans>
)
</small>
)}
{!loading &&
Expand All @@ -214,10 +219,15 @@ export function LoggedInUser({
userData?.displayName &&
hasSyncedPrefs && (
<small>
(<Trans>logged in as:</Trans>{' '}
<span>
<PrivacyFilter>{userData?.displayName}</PrivacyFilter>
</span>
(
<Trans>
logged in as:{' '}
<span>
<PrivacyFilter>
{{ userName: userData?.displayName } as any}

Check failure on line 227 in packages/desktop-client/src/components/LoggedInUser.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
</PrivacyFilter>
</span>
</Trans>
)
</small>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ export function CloseAccountModal({
<Paragraph>
<Trans>
Are you sure you want to close{' '}
<strong>
<Trans>{{ accountName: account.name }}</Trans>
</strong>
?{' '}
<strong>{{ accountName: account.name } as any}</strong>?{' '}

Check failure on line 124 in packages/desktop-client/src/components/modals/CloseAccountModal.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
</Trans>
{canDelete ? (
<span>
Expand Down Expand Up @@ -154,7 +151,7 @@ export function CloseAccountModal({
<Trans>
This account has a balance of{' '}
<strong>
<Trans>{{ balance: integerToCurrency(balance) }}</Trans>
{{ balance: integerToCurrency(balance) } as any}

Check failure on line 154 in packages/desktop-client/src/components/modals/CloseAccountModal.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
</strong>
. To close this account, select a different account to
transfer this balance to:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export function SaveReportDelete({
<Text style={{ color: theme.errorText, marginBottom: 5 }}>
Are you sure you want to delete report:{' '}
</Text>
<View>
<Trans>{{ name }}</Trans>
</View>
<View>{{ name } as any}</View>

Check failure on line 28 in packages/desktop-client/src/components/reports/SaveReportDelete.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
</Trans>
</View>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,8 @@ function RecurringScheduleTooltip({
htmlFor="solve_dropdown"
style={{ userSelect: 'none', marginLeft: 5 }}
>
<Trans> {{ beforeOrAfter: '' }} weekend</Trans>
{' '}
{{ beforeOrAfter: '' } as any} weekend

Check failure on line 543 in packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
</label>
</Trans>
</View>
Expand Down

0 comments on commit 30bf0c6

Please sign in to comment.