interface BlockPage {
    component: ComponentType<BlockComponentProps>;
    name: string;
    navigationOptions?: {
        hideFooter?: boolean;
        hideSideNavigation?: boolean;
        hideTopBarBorder?: boolean;
        keepSearchParamsOnBack?: boolean;
        topBarType?: "standard" | "singleItem" | "noMenu";
        [key: string]: unknown;
    };
    pageTitle?: ((t) => string) | {
        fallback: ((t) => string);
        fetch: ((blockProps, t, updatePageTitle) => void);
    };
    parentBlockPath?: string;
    path: string;
    validators?: Record<string, FC<BlockValidatorProps>>;
}

Properties

component: ComponentType<BlockComponentProps>

The component to render for this block page

name: string

The name of this block. Used to refer between blocks

navigationOptions?: {
    hideFooter?: boolean;
    hideSideNavigation?: boolean;
    hideTopBarBorder?: boolean;
    keepSearchParamsOnBack?: boolean;
    topBarType?: "standard" | "singleItem" | "noMenu";
    [key: string]: unknown;
}

Arbitrary options passed through to navigation component

Type declaration

  • [key: string]: unknown
  • Optional hideFooter?: boolean

    When true, hide the footer (if present)

  • Optional hideSideNavigation?: boolean

    When true, hide the side navigation

  • Optional hideTopBarBorder?: boolean

    When true, hide the bottom border of the navigation top bar when this page is shown

  • Optional keepSearchParamsOnBack?: boolean

    When true, keep the current query params when clicking the back button at the top right

  • Optional topBarType?: "standard" | "singleItem" | "noMenu"

    Controls the display type of the navigation top bar when this page is shown

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

The title of the page. Used for the document title of the app, and in breadcrumbs. This can be specified as a translatable string, or as a callback (useful when the title depends on an API call)

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

parentBlockPath?: string

The path to another block page that would be the parent to this block. Used for breadcrumbs

path: string

The url this page should match to

validators?: Record<string, FC<BlockValidatorProps>>

Validators for the block page

Generated using TypeDoc