• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

code4recovery / tsml-ui / 18451009991

12 Oct 2025 11:29PM UTC coverage: 43.532% (-19.9%) from 63.458%
18451009991

Pull #475

github

web-flow
Merge 9d0374e51 into 0a0ddf96f
Pull Request #475: pretty permalinks

369 of 1009 branches covered (36.57%)

Branch coverage included in aggregate %.

15 of 37 new or added lines in 5 files covered. (40.54%)

236 existing lines in 17 files now uncovered.

553 of 1109 relevant lines covered (49.86%)

4.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/components/Title.tsx
1
import { getIndexByKey, formatString as i18n } from '../helpers';
2
import { useData, useInput, useSettings } from '../hooks';
3

4
export default function Title() {
UNCOV
5
  const { indexes } = useData();
×
UNCOV
6
  const { input } = useInput();
×
UNCOV
7
  const { settings, strings } = useSettings();
×
8

9
  // build title from strings.title
UNCOV
10
  const parts: string[] = [];
×
11

UNCOV
12
  Object.keys(strings.title).forEach(key => {
×
UNCOV
13
    if (key === 'meetings') {
×
UNCOV
14
      parts.push(strings.meetings);
×
UNCOV
15
    } else if (
×
16
      key === 'search_with' &&
×
17
      input.mode === 'search' &&
18
      input.search
19
    ) {
20
      parts.push(
×
21
        i18n(strings.title.search_with, {
22
          search: input.search,
23
        })
24
      );
UNCOV
25
    } else if (
×
26
      key === 'search_near' &&
×
27
      input.mode === 'location' &&
28
      input.search
29
    ) {
30
      parts.push(
×
31
        i18n(strings.title.search_near, {
32
          search: input.search,
33
        })
34
      );
UNCOV
35
    } else if (
×
36
      input[key as keyof typeof input] &&
×
37
      indexes[key as keyof typeof indexes] &&
38
      key !== 'distance'
39
    ) {
UNCOV
40
      const value = (input[key as keyof typeof input] as string[])
×
41
        .map(
42
          value =>
43
            getIndexByKey(indexes[key as keyof typeof indexes], value)?.name
×
44
        )
45
        .join(' + ');
UNCOV
46
      if (value?.length) {
×
47
        parts.push(
×
48
          i18n(strings.title[key as keyof typeof strings.title], {
49
            [key]: value,
50
          })
51
        );
52
      }
UNCOV
53
    } else if (key === 'distance' && input.distance) {
×
54
      // todo
55
      parts.push(
×
56
        i18n(strings.title.distance, {
57
          distance: `${input.distance} ${settings.distance_unit}`,
58
        })
59
      );
60
    }
61
  });
62

UNCOV
63
  const title = parts.join(' ');
×
64

65
  // set window title
UNCOV
66
  document.title = title;
×
67

UNCOV
68
  return <h1 aria-live="polite">{title}</h1>;
×
69
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc