diff --git a/src/components/StarterPack/StarterPackCard.tsx b/src/components/StarterPack/StarterPackCard.tsx index b8483fa212..f5a25a6439 100644 --- a/src/components/StarterPack/StarterPackCard.tsx +++ b/src/components/StarterPack/StarterPackCard.tsx @@ -127,7 +127,10 @@ export function useStarterPackLink({ return { to: `/starter-pack/${handleOrDid}/${rkey}`, - label: AppBskyGraphStarterpack.isRecord(view.record) + label: bsky.dangerousIsType( + view.record, + AppBskyGraphStarterpack.isRecord, + ) ? _(msg`Navigate to ${view.record.name}`) : _(msg`Navigate to starter pack`), precache, @@ -151,7 +154,12 @@ export function Link({ return {rkey, handleOrDid: creator.handle || creator.did} }, [starterPack]) - if (!AppBskyGraphStarterpack.isRecord(record)) { + if ( + !bsky.dangerousIsType( + record, + AppBskyGraphStarterpack.isRecord, + ) + ) { return null } diff --git a/src/screens/Hashtag.tsx b/src/screens/Hashtag.tsx index 251be89061..9b0d238a0c 100644 --- a/src/screens/Hashtag.tsx +++ b/src/screens/Hashtag.tsx @@ -65,7 +65,7 @@ export default function HashtagScreen({ }, [fullTag, isCashtag]) const sanitizedAuthor = React.useMemo(() => { - if (!author) return + if (!author) return '' return sanitizeHandle(author) }, [author]) diff --git a/src/screens/StarterPack/Wizard/StepDetails.tsx b/src/screens/StarterPack/Wizard/StepDetails.tsx index e8f4132049..5a7770f2f0 100644 --- a/src/screens/StarterPack/Wizard/StepDetails.tsx +++ b/src/screens/StarterPack/Wizard/StepDetails.tsx @@ -20,9 +20,11 @@ export function StepDetails() { const {currentAccount} = useSession() const {data: currentProfile} = useProfileQuery({ did: currentAccount?.did, - staleTime: 300, + staleTime: Infinity, }) + const name = currentProfile?.displayName || currentProfile?.handle + return ( @@ -43,11 +45,9 @@ export function StepDetails() { dispatch({type: 'SetName', name: text})} /> @@ -71,11 +71,11 @@ export function StepDetails() { dispatch({type: 'SetDescription', description: text}) diff --git a/src/state/queries/starter-packs.ts b/src/state/queries/starter-packs.ts index 74d75814e8..53d668d89a 100644 --- a/src/state/queries/starter-packs.ts +++ b/src/state/queries/starter-packs.ts @@ -352,7 +352,7 @@ async function whenAppViewReady( ) } -export async function precacheStarterPack( +export function precacheStarterPack( queryClient: QueryClient, starterPack: | AppBskyGraphDefs.StarterPackViewBasic