Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

515 B
Raw Blame
/** The words a cover and the pages around the chapters are set from, and whose they are. */

export interface CoverWords {
  title: string;
  subtitle: string | null;
  ownTitle?: string;
  ownSubtitle?: string;
}

/** A title the journey owns, bound to it, or the person's own words, not bound. */
export function titleWords(own: string | undefined, journey: string): { words: string; bound: boolean } {
  return own !== undefined && own.trim() ? { words: own, bound: false } : { words: journey, bound: true };
}