Bump @types/react to ^18 and adjust types (#889)
This commit is contained in:
@@ -13,6 +13,7 @@ import {Text} from 'view/com/util/text/Text'
|
||||
import {isDesktopWeb} from 'platform/detection'
|
||||
import {usePalette} from 'lib/hooks/usePalette'
|
||||
import {s} from 'lib/styles'
|
||||
import {CustomFeedModel} from 'state/models/feeds/custom-feed'
|
||||
|
||||
type Props = NativeStackScreenProps<CommonNavigatorParams, 'DiscoverFeeds'>
|
||||
export const DiscoverFeedsScreen = withAuthRequired(
|
||||
@@ -51,7 +52,7 @@ export const DiscoverFeedsScreen = withAuthRequired(
|
||||
}, [pal, feeds.isLoading])
|
||||
|
||||
const renderItem = React.useCallback(
|
||||
({item}) => (
|
||||
({item}: {item: CustomFeedModel}) => (
|
||||
<CustomFeed
|
||||
key={item.data.uri}
|
||||
item={item}
|
||||
|
||||
@@ -100,7 +100,7 @@ export const SavedFeeds = withAuthRequired(
|
||||
const onRefresh = useCallback(() => savedFeeds.refresh(), [savedFeeds])
|
||||
|
||||
const onDragEnd = useCallback(
|
||||
async ({data}) => {
|
||||
async ({data}: {data: CustomFeedModel[]}) => {
|
||||
try {
|
||||
await savedFeeds.reorderPinnedFeeds(data)
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user