Skip to main content

Functions by entry point

The functions each of the package's four entry points exports.

@fairgarden/indicators

For lib/indicators.ts:

On the object createIndicators returns, for layouts and pages:

  • generateStaticParams — the variants to prerender, all at once or per level
  • read — the locale, preferences and flags a route's params name
  • layout and page — the same, as a wrapper
  • encode and decode — a segment from values, and back
  • href, splitLocale, negotiate — locale-aware paths, server side
  • stylesheets() and the Stylesheets component — the links for indicators expressed through a stylesheet: the global ones in the layout, and with only, the ones a page links itself

Standalone, for tests and tooling:

  • Helpers — negotiateLocale, localizeHref, mountHref, indicatorsRewrites and friends

@fairgarden/indicators/withFairGardenIndicators

For next.config.ts:

For a client module such as lib/link.ts:

  • createNavigation — Link, useHref, useIndicators, useLocale and usePref, bound to the app's config

@fairgarden/indicators/proxy

For proxy.ts: