fix type errors
This commit is contained in:
@@ -96,6 +96,7 @@ export function QrCodeDialog({
|
||||
await setImageAsync(base64)
|
||||
} else {
|
||||
const canvas = await getCanvas(uri)
|
||||
// @ts-expect-error web only
|
||||
canvas.toBlob((blob: Blob) => {
|
||||
const item = new ClipboardItem({'image/png': blob})
|
||||
navigator.clipboard.write([item])
|
||||
|
||||
@@ -16,7 +16,7 @@ export function useStarterPackEntry() {
|
||||
|
||||
if (name && rkey) {
|
||||
setUsedStarterPack({
|
||||
uri: window.href,
|
||||
uri: window.location.href,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -16,8 +16,8 @@ export const createStarterPackList = async ({
|
||||
descriptionFacets?: Facet[]
|
||||
profiles: AppBskyActorDefs.ProfileViewBasic[]
|
||||
agent: BskyAgent
|
||||
}): Promise<{uri: string; cid: string} | undefined> => {
|
||||
if (profiles.length === 0) return
|
||||
}): Promise<{uri: string; cid: string}> => {
|
||||
if (profiles.length === 0) throw new Error('No profiles given')
|
||||
|
||||
const list = await agent.app.bsky.graph.list.create(
|
||||
{repo: agent.session!.did},
|
||||
@@ -90,7 +90,7 @@ export async function generateStarterpack({
|
||||
},
|
||||
{
|
||||
name: defaultName ?? '',
|
||||
list: list?.uri,
|
||||
list: list.uri,
|
||||
createdAt: new Date().toISOString(),
|
||||
},
|
||||
)
|
||||
|
||||
@@ -333,7 +333,7 @@ function WizardInner({
|
||||
name: state.name ?? defaultName,
|
||||
description: state.description,
|
||||
descriptionFacets: [],
|
||||
list: list?.uri,
|
||||
list: list.uri,
|
||||
feeds: state.feeds.map(f => ({
|
||||
uri: f.uri,
|
||||
})),
|
||||
|
||||
Reference in New Issue
Block a user