Fix up types in starter-packs queries
This commit is contained in:
@@ -131,7 +131,7 @@ export function useCreateStarterPackMutation({
|
|||||||
|
|
||||||
return await agent.app.bsky.graph.starterpack.create(
|
return await agent.app.bsky.graph.starterpack.create(
|
||||||
{
|
{
|
||||||
repo: agent.session?.did,
|
repo: agent.session?.did!,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name,
|
name,
|
||||||
@@ -366,7 +366,10 @@ export async function precacheStarterPack(
|
|||||||
let starterPackView: AppBskyGraphDefs.StarterPackView | undefined
|
let starterPackView: AppBskyGraphDefs.StarterPackView | undefined
|
||||||
if (AppBskyGraphDefs.isStarterPackView(starterPack)) {
|
if (AppBskyGraphDefs.isStarterPackView(starterPack)) {
|
||||||
starterPackView = starterPack
|
starterPackView = starterPack
|
||||||
} else if (AppBskyGraphDefs.isStarterPackViewBasic(starterPack)) {
|
} else if (
|
||||||
|
AppBskyGraphDefs.isStarterPackViewBasic(starterPack) &&
|
||||||
|
AppBskyGraphStarterpack.isValidRecord(starterPack.record)
|
||||||
|
) {
|
||||||
const listView: AppBskyGraphDefs.ListViewBasic = {
|
const listView: AppBskyGraphDefs.ListViewBasic = {
|
||||||
uri: starterPack.record.list,
|
uri: starterPack.record.list,
|
||||||
// This will be populated once the data from server is fetched
|
// This will be populated once the data from server is fetched
|
||||||
|
|||||||
Reference in New Issue
Block a user