diff --git a/eslint-suppressions.json b/eslint-suppressions.json
index 1c4c89f381..5bd3357d19 100644
--- a/eslint-suppressions.json
+++ b/eslint-suppressions.json
@@ -1346,9 +1346,6 @@
}
},
"src/screens/Profile/components/ProfileFeedHeader.tsx": {
- "@typescript-eslint/no-floating-promises": {
- "count": 1
- },
"@typescript-eslint/no-misused-promises": {
"count": 5
}
diff --git a/src/screens/Profile/components/ProfileFeedHeader.tsx b/src/screens/Profile/components/ProfileFeedHeader.tsx
index 6966fa6fe2..c640c84f33 100644
--- a/src/screens/Profile/components/ProfileFeedHeader.tsx
+++ b/src/screens/Profile/components/ProfileFeedHeader.tsx
@@ -1,9 +1,7 @@
import {useCallback, useMemo, useState} from 'react'
import {View} from 'react-native'
import {AtUri} from '@atproto/api'
-import {msg} from '@lingui/core/macro'
-import {useLingui} from '@lingui/react'
-import {Plural, Trans} from '@lingui/react/macro'
+import {Plural, Trans, useLingui} from '@lingui/react/macro'
import {useHaptics} from '#/lib/haptics'
import {makeCustomFeedLink, makeProfileLink} from '#/lib/routes/links'
@@ -26,7 +24,6 @@ import {atoms as a, useBreakpoints, useTheme, web} from '#/alf'
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {Divider} from '#/components/Divider'
-import {useRichText} from '#/components/hooks/useRichText'
import {ArrowOutOfBoxModified_Stroke2_Corner2_Rounded as Share} from '#/components/icons/ArrowOutOfBox'
import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo'
import {DotGrid3x1_Stroke2_Corner0_Rounded as Ellipsis} from '#/components/icons/DotGrid'
@@ -86,7 +83,7 @@ export function ProfileFeedHeaderSkeleton() {
export function ProfileFeedHeader({info}: {info: FeedSourceFeedInfo}) {
const t = useTheme()
- const {_, i18n} = useLingui()
+ const {t: l, i18n} = useLingui()
const ax = useAnalytics()
const {hasSession} = useSession()
const {gtMobile} = useBreakpoints()
@@ -121,7 +118,7 @@ export function ProfileFeedHeader({info}: {info: FeedSourceFeedInfo}) {
if (savedFeedConfig) {
await removeFeed(savedFeedConfig)
- Toast.show(_(msg`Removed from your feeds`))
+ Toast.show(l`Removed from your feeds`)
ax.metric('feed:unsave', {feedUrl: info.uri})
} else {
await addSavedFeeds([
@@ -131,14 +128,12 @@ export function ProfileFeedHeader({info}: {info: FeedSourceFeedInfo}) {
pinned: false,
},
])
- Toast.show(_(msg`Saved to your feeds`))
+ Toast.show(l`Saved to your feeds`)
ax.metric('feed:save', {feedUrl: info.uri})
}
} catch (err) {
Toast.show(
- _(
- msg`There was an issue updating your feeds, please check your internet connection and try again.`,
- ),
+ l`There was an issue updating your feeds, please check your internet connection and try again.`,
{
type: 'error',
},
@@ -161,10 +156,10 @@ export function ProfileFeedHeader({info}: {info: FeedSourceFeedInfo}) {
])
if (pinned) {
- Toast.show(_(msg`Pinned ${info.displayName} to Home`))
+ Toast.show(l`Pinned ${info.displayName} to Home`)
ax.metric('feed:pin', {feedUrl: info.uri})
} else {
- Toast.show(_(msg`Unpinned ${info.displayName} from Home`))
+ Toast.show(l`Unpinned ${info.displayName} from Home`)
ax.metric('feed:unpin', {feedUrl: info.uri})
}
} else {
@@ -175,11 +170,11 @@ export function ProfileFeedHeader({info}: {info: FeedSourceFeedInfo}) {
pinned: true,
},
])
- Toast.show(_(msg`Pinned ${info.displayName} to Home`))
+ Toast.show(l`Pinned ${info.displayName} to Home`)
ax.metric('feed:pin', {feedUrl: info.uri})
}
} catch (e) {
- Toast.show(_(msg`There was an issue contacting the server`), {
+ Toast.show(l`There was an issue contacting the server`, {
type: 'error',
})
logger.error('Failed to toggle pinned feed', {message: e})
@@ -194,7 +189,7 @@ export function ProfileFeedHeader({info}: {info: FeedSourceFeedInfo}) {