fix: editor auto fill

This commit is contained in:
DIYgod 2023-08-26 01:02:43 +01:00
parent 3bf8c1d3ba
commit 323fbc9422
No known key found for this signature in database
5 changed files with 6 additions and 0 deletions

View File

@ -83,6 +83,7 @@ export default function PortfolioEditor() {
noteId: pageId && /\d+/.test(pageId) ? +pageId : undefined,
slug: pageId || draftKey.replace(`draft-${site.data?.characterId}-`, ""),
handle: subdomain,
disableAutofill: true,
})
const [visibility, setVisibility] = useState<PageVisibilityEnum>()

View File

@ -106,6 +106,7 @@ export default function PostEditor() {
noteId: pageId && /\d+/.test(pageId) ? +pageId : undefined,
slug: pageId || draftKey.replace(`draft-${site.data?.characterId}-`, ""),
handle: subdomain,
disableAutofill: true,
})
const [visibility, setVisibility] = useState<PageVisibilityEnum>()

View File

@ -81,6 +81,7 @@ export default function ShortEditor() {
noteId: pageId && /\d+/.test(pageId) ? +pageId : undefined,
slug: pageId || draftKey.replace(`draft-${site.data?.characterId}-`, ""),
handle: subdomain,
disableAutofill: true,
})
const [visibility, setVisibility] = useState<PageVisibilityEnum>()

View File

@ -409,6 +409,7 @@ export async function getPage<TRender extends boolean = false>(input: {
useStat?: boolean
noteId?: number
handle?: string // In order to be compatible with old drafts
disableAutofill?: boolean
}) {
const mustLocal = input.slug?.startsWith("!local-") && !input.noteId
@ -559,6 +560,7 @@ export async function getPage<TRender extends boolean = false>(input: {
expandedNote = await expandCrossbellNote({
note: page,
useStat: input.useStat,
disableAutofill: input.disableAutofill,
})
}

View File

@ -93,6 +93,7 @@ export const useGetPage = (
noteId: input.noteId,
useStat: input.useStat,
handle: input.handle,
disableAutofill: input.disableAutofill,
})
})
}