Routing

All routes are described in config/routes.ts file. It contains an array of Routes and a Route follows this structure:

interface Route {
  // Path string, ex. /companies/:id
  // To route your component on multiple paths, add them in an array.
  path: string | string[]
  
  // Your component
  component: MemoExoticComponent<() => React.ReactElement> | React.ReactElement
  
  // Title for the window.
  // ex. 'Companies' will be displayed like 'Companies | habra.' in your browser tab
  title?: string
  
  // Should show app bar AND bottom bar on page
  shouldShowAppBar?: boolean
  
  // App bar color
  appBarColor?: (theme: Theme) => string
  
  // [Deprecated] Changes app bar color from theme.palette.background.default to paper
  // on scroll
  shouldAppBarChangeColors?: boolean
  
  // Page alias (slug), camel-cased
  alias: string
}

Last updated