Fix types

This commit is contained in:
Eric Bailey
2025-02-13 11:25:13 -06:00
parent 81ddda2def
commit d204c8cccc
+7 -6
View File
@@ -76,6 +76,7 @@ import {Earth_Stroke2_Corner0_Rounded as EarthIcon} from '#/components/icons/Glo
import * as Layout from '#/components/Layout' import * as Layout from '#/components/Layout'
import * as Menu from '#/components/Menu' import * as Menu from '#/components/Menu'
import {account, useStorage} from '#/storage' import {account, useStorage} from '#/storage'
import * as bsky from '#/types/bsky'
function Loader() { function Loader() {
return ( return (
@@ -631,7 +632,7 @@ export function SearchScreen(
) )
const updateProfileHistory = useCallback( const updateProfileHistory = useCallback(
async (item: AppBskyActorDefs.ProfileViewBasic) => { async (item: bsky.profile.AnyProfileView) => {
const newAccountHistory = [ const newAccountHistory = [
item.did, item.did,
...accountHistory.filter(p => p !== item.did), ...accountHistory.filter(p => p !== item.did),
@@ -648,7 +649,7 @@ export function SearchScreen(
[termHistory, setTermHistory], [termHistory, setTermHistory],
) )
const deleteProfileHistoryItem = useCallback( const deleteProfileHistoryItem = useCallback(
async (item: AppBskyActorDefs.ProfileViewBasic) => { async (item: AppBskyActorDefs.ProfileViewDetailed) => {
setAccountHistory(accountHistory.filter(p => p !== item.did)) setAccountHistory(accountHistory.filter(p => p !== item.did))
}, },
[accountHistory, setAccountHistory], [accountHistory, setAccountHistory],
@@ -739,7 +740,7 @@ export function SearchScreen(
) )
const handleProfileClick = React.useCallback( const handleProfileClick = React.useCallback(
(profile: AppBskyActorDefs.ProfileViewBasic) => { (profile: bsky.profile.AnyProfileView) => {
// Slight delay to avoid updating during push nav animation. // Slight delay to avoid updating during push nav animation.
setTimeout(() => { setTimeout(() => {
updateProfileHistory(profile) updateProfileHistory(profile)
@@ -972,11 +973,11 @@ function SearchHistory({
onRemoveProfileClick, onRemoveProfileClick,
}: { }: {
searchHistory: string[] searchHistory: string[]
selectedProfiles: AppBskyActorDefs.ProfileViewBasic[] selectedProfiles: AppBskyActorDefs.ProfileViewDetailed[]
onItemClick: (item: string) => void onItemClick: (item: string) => void
onProfileClick: (profile: AppBskyActorDefs.ProfileViewBasic) => void onProfileClick: (profile: AppBskyActorDefs.ProfileViewDetailed) => void
onRemoveItemClick: (item: string) => void onRemoveItemClick: (item: string) => void
onRemoveProfileClick: (profile: AppBskyActorDefs.ProfileViewBasic) => void onRemoveProfileClick: (profile: AppBskyActorDefs.ProfileViewDetailed) => void
}) { }) {
const {isMobile} = useWebMediaQueries() const {isMobile} = useWebMediaQueries()
const pal = usePalette('default') const pal = usePalette('default')