fix type errors

This commit is contained in:
Hailey
2024-06-13 17:47:11 -07:00
parent bcb19433fc
commit f8cbbbb62f
6 changed files with 11 additions and 10 deletions
@@ -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])
+1 -1
View File
@@ -16,7 +16,7 @@ export function useStarterPackEntry() {
if (name && rkey) {
setUsedStarterPack({
uri: window.href,
uri: window.location.href,
})
}
} else {
+3 -3
View File
@@ -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(),
},
)
+1 -1
View File
@@ -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,
})),