interface AutoloadPageTitleOptions {
    blockProps: BlockComponentProps;
    pageTitleHandler?: ((t) => string) | {
        fallback: ((t) => string);
        fetch: ((blockProps, t, updatePageTitle) => void);
    };
    setPageTitle: ((title) => void);
}

Properties

Props to pass to the block (used as context for page title handler)

pageTitleHandler?: ((t) => string) | {
    fallback: ((t) => string);
    fetch: ((blockProps, t, updatePageTitle) => void);
}

The handler for page title loading

Type declaration

    • (t): string
    • Parameters

      Returns string

Type declaration

  • fallback: ((t) => string)
      • (t): string
      • Parameters

        Returns string

  • fetch: ((blockProps, t, updatePageTitle) => void)
      • (blockProps, t, updatePageTitle): void
      • Parameters

        • blockProps: BlockComponentProps
        • t: TFunction<"translation", undefined>
        • updatePageTitle: ((title) => void)
            • (title): void
            • Parameters

              • title: string

              Returns void

        Returns void

setPageTitle: ((title) => void)

Callback to update the page title

Type declaration

    • (title): void
    • Callback to update the page title

      Parameters

      • title: string

      Returns void

Generated using TypeDoc