remove imports from @atproto/api internals (#8403)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import {type ListRenderItemInfo, View} from 'react-native'
|
||||
import {type PostView} from '@atproto/api/dist/client/types/app/bsky/feed/defs'
|
||||
import {type AppBskyFeedDefs} from '@atproto/api'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useFocusEffect} from '@react-navigation/native'
|
||||
@@ -25,11 +25,11 @@ import {ArrowOutOfBoxModified_Stroke2_Corner2_Rounded as Share} from '#/componen
|
||||
import * as Layout from '#/components/Layout'
|
||||
import {ListFooter, ListMaybePlaceholder} from '#/components/Lists'
|
||||
|
||||
const renderItem = ({item}: ListRenderItemInfo<PostView>) => {
|
||||
const renderItem = ({item}: ListRenderItemInfo<AppBskyFeedDefs.PostView>) => {
|
||||
return <Post post={item} />
|
||||
}
|
||||
|
||||
const keyExtractor = (item: PostView, index: number) => {
|
||||
const keyExtractor = (item: AppBskyFeedDefs.PostView, index: number) => {
|
||||
return `${item.uri}-${index}`
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {
|
||||
type AppBskyActorDefs,
|
||||
type AppBskyActorProfile,
|
||||
type AppBskyGraphDefs,
|
||||
AppBskyGraphStarterpack,
|
||||
type Un$Typed,
|
||||
} from '@atproto/api'
|
||||
import {type SavedFeed} from '@atproto/api/dist/client/types/app/bsky/actor/defs'
|
||||
import {TID} from '@atproto/common-web'
|
||||
import {msg, Trans} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
@@ -108,7 +108,7 @@ export function StepFinished() {
|
||||
await agent.setInterestsPref({tags: selectedInterests})
|
||||
|
||||
// Default feeds that every user should have pinned when landing in the app
|
||||
const feedsToSave: SavedFeed[] = [
|
||||
const feedsToSave: AppBskyActorDefs.SavedFeed[] = [
|
||||
{
|
||||
...DISCOVER_SAVED_FEED,
|
||||
id: TID.nextStr(),
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import React from 'react'
|
||||
import {type AppBskyGraphDefs, AppBskyGraphStarterpack} from '@atproto/api'
|
||||
import {type GeneratorView} from '@atproto/api/dist/client/types/app/bsky/feed/defs'
|
||||
import {
|
||||
type AppBskyFeedDefs,
|
||||
type AppBskyGraphDefs,
|
||||
AppBskyGraphStarterpack,
|
||||
} from '@atproto/api'
|
||||
import {msg, plural} from '@lingui/macro'
|
||||
|
||||
import {STARTER_PACK_MAX_SIZE} from '#/lib/constants'
|
||||
@@ -19,7 +22,7 @@ type Action =
|
||||
| {type: 'SetDescription'; description: string}
|
||||
| {type: 'AddProfile'; profile: bsky.profile.AnyProfileView}
|
||||
| {type: 'RemoveProfile'; profileDid: string}
|
||||
| {type: 'AddFeed'; feed: GeneratorView}
|
||||
| {type: 'AddFeed'; feed: AppBskyFeedDefs.GeneratorView}
|
||||
| {type: 'RemoveFeed'; feedUri: string}
|
||||
| {type: 'SetProcessing'; processing: boolean}
|
||||
| {type: 'SetError'; error: string}
|
||||
@@ -30,7 +33,7 @@ interface State {
|
||||
name?: string
|
||||
description?: string
|
||||
profiles: bsky.profile.AnyProfileView[]
|
||||
feeds: GeneratorView[]
|
||||
feeds: AppBskyFeedDefs.GeneratorView[]
|
||||
processing: boolean
|
||||
error?: string
|
||||
transitionDirection: 'Backward' | 'Forward'
|
||||
|
||||
@@ -5,11 +5,11 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||
import {Image} from 'expo-image'
|
||||
import {
|
||||
type AppBskyActorDefs,
|
||||
type AppBskyFeedDefs,
|
||||
type AppBskyGraphDefs,
|
||||
AtUri,
|
||||
type ModerationOpts,
|
||||
} from '@atproto/api'
|
||||
import {type GeneratorView} from '@atproto/api/dist/client/types/app/bsky/feed/defs'
|
||||
import {msg, Plural, Trans} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useFocusEffect, useNavigation} from '@react-navigation/native'
|
||||
@@ -591,7 +591,9 @@ function Footer({
|
||||
)
|
||||
}
|
||||
|
||||
function getName(item: bsky.profile.AnyProfileView | GeneratorView) {
|
||||
function getName(
|
||||
item: bsky.profile.AnyProfileView | AppBskyFeedDefs.GeneratorView,
|
||||
) {
|
||||
if (typeof item.displayName === 'string') {
|
||||
return enforceLen(sanitizeDisplayName(item.displayName), 28, true)
|
||||
} else if ('handle' in item && typeof item.handle === 'string') {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import {type ListRenderItemInfo, View} from 'react-native'
|
||||
import {type PostView} from '@atproto/api/dist/client/types/app/bsky/feed/defs'
|
||||
import {type AppBskyFeedDefs} from '@atproto/api'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useFocusEffect} from '@react-navigation/native'
|
||||
@@ -24,11 +24,11 @@ import {ArrowOutOfBoxModified_Stroke2_Corner2_Rounded as Share} from '#/componen
|
||||
import * as Layout from '#/components/Layout'
|
||||
import {ListFooter, ListMaybePlaceholder} from '#/components/Lists'
|
||||
|
||||
const renderItem = ({item}: ListRenderItemInfo<PostView>) => {
|
||||
const renderItem = ({item}: ListRenderItemInfo<AppBskyFeedDefs.PostView>) => {
|
||||
return <Post post={item} />
|
||||
}
|
||||
|
||||
const keyExtractor = (item: PostView, index: number) => {
|
||||
const keyExtractor = (item: AppBskyFeedDefs.PostView, index: number) => {
|
||||
return `${item.uri}-${index}`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user