routeTitle.tsx 332 B

12345678910111213
  1. function routeTitleGen(
  2. routeName: string,
  3. orgSlug: string,
  4. withSentry: boolean = true,
  5. projectSlug?: string
  6. ): string {
  7. const tmplBase = `${routeName} - ${orgSlug}`;
  8. const tmpl = projectSlug ? `${tmplBase} - ${projectSlug}` : tmplBase;
  9. return withSentry ? `${tmpl} - Sentry` : tmpl;
  10. }
  11. export default routeTitleGen;