RegisterRouteComponentOptions
RegisterRouteComponentOptions
Configuration for a route component.
Signature
type RegisterRouteComponentOptions<Component extends any | BaseDetailComponent<Entity>, Entity extends { id: string; updatedAt?: string }, T extends DocumentNode | TypedDocumentNode<any, { id: string }>, Field extends keyof ResultOf<T>, R extends Field> = {
component: Type<Component> | Component;
title?: string;
locationId?: string;
description?: string;
breadcrumb?: BreadcrumbValue;
path?: string;
query?: T;
getBreadcrumbs?: (entity: Exclude<ResultOf<T>[R], 'Query'>) => BreadcrumbValue;
entityKey?: Component extends BaseDetailComponent<any> ? R : string;
variables?: T extends TypedDocumentNode<any, infer V> ? Omit<V, 'id'> : never;
routeConfig?: Route;
} & (Component extends BaseDetailComponent<any> ? { entityKey: R } : unknown)