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

nilfalse / ctf / 13441092049

20 Feb 2025 05:26PM UTC coverage: 85.531%. Remained the same
13441092049

Pull #355

github

web-flow
⬆️ Update webpack to version 5.98.0
Pull Request #355: 🚨 [security] Update webpack 5.91.0 → 5.98.0 (minor)

229 of 284 branches covered (80.63%)

Branch coverage included in aggregate %.

569 of 649 relevant lines covered (87.67%)

66.79 hits per line

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

55.0
/packages/landing/src/install_action.tsx
1
import { useEffect, useState, FC } from 'react';
2

3
import { CallToAction } from './call-to-action';
4
import { firefoxDownloadURL, webstores } from './data';
5

6
function addToFirefox() {
7
  return (
×
8
    InstallTrigger as {
9
      install: (trigger: Record<string, unknown>) => boolean;
10
    }
11
  ).install({
12
    'Capture The Flag': firefoxDownloadURL,
13
  });
14
}
15

16
export const InstallAction: FC = () => {
5✔
17
  const [impl, setImpl] = useState<string | null>(null);
2✔
18

19
  useEffect(() => {
2✔
20
    const hasInstallTrigger = typeof InstallTrigger !== 'undefined';
2✔
21
    if (hasInstallTrigger) {
2!
22
      setImpl('firefox');
×
23
    } else if (navigator.userAgent.includes('Chrome/')) {
2!
24
      setImpl('chromium');
×
25
    }
26
  }, []);
27

28
  switch (impl) {
2!
29
    case 'firefox':
30
      return (
×
31
        <CallToAction onClick={addToFirefox}>
32
          <span className="hero__cta-bold">Add to Firefox</span> It's free
33
        </CallToAction>
34
      );
35
    case 'chromium':
36
      return (
×
37
        <CallToAction href={webstores.google} target="_blank" rel="noopener">
38
          <span className="hero__cta-bold">Add to Chrome</span> It's free
39
        </CallToAction>
40
      );
41
    default:
42
      return (
2✔
43
        <CallToAction href="#download" rel="noopener">
44
          <span className="hero__cta-bold">Download</span> It's free
45
        </CallToAction>
46
      );
47
  }
48
};
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

© 2025 Coveralls, Inc