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

mozilla / fx-private-relay / 5b14aa7b-40b5-428d-b62a-f76e0a58515a

17 Jan 2024 09:41PM CUT coverage: 73.672% (+0.02%) from 73.653%
5b14aa7b-40b5-428d-b62a-f76e0a58515a

Pull #4318

circleci

groovecoder
fix MPP-3700: empty DomainAddress.used_on|description fields when profile.server_storage=False

The ServerStorageCleaner task cleans this data out, but this change
means the task has less work to do each time it runs.
Pull Request #4318: fix MPP-3700: empty DomainAddress.used_on|description fields when pro…

1985 of 2942 branches covered (0.0%)

Branch coverage included in aggregate %.

6334 of 8350 relevant lines covered (75.86%)

20.05 hits per line

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

0.0
/frontend/src/components/landing/DemoPhone.tsx
1
import Image, { StaticImageData } from "next/image";
×
2
import styles from "./DemoPhone.module.scss";
×
3
import BgImage from "./images/hero-image-bg.svg";
×
4
import PremiumScreenshot from "./images/hero-image-premium.svg";
×
5
import PremiumScreenshotFr from "./images/hero-image-premium-fr.svg";
×
6
import PremiumScreenshotDe from "./images/hero-image-premium-de.svg";
×
7
import NoPremiumScreenshot from "./images/hero-image-nopremium.svg";
×
8
import FgImage from "./images/hero-image-fg.svg";
×
9
import FgImageDe from "./images/hero-image-fg-de.svg";
×
10
import FgImageFr from "./images/hero-image-fg-fr.svg";
×
11
import { getLocale } from "../../functions/getLocale";
×
12
import { useL10n } from "../../hooks/l10n";
×
13

14
export type Props = {
15
  premium?: boolean;
16
};
17

18
/**
19
 * Image of a phone showing the Relay interface, either the Premium or regular UI as desired.
20
 */
21

22
export const DemoPhone = (props: Props) => {
×
23
  const l10n = useL10n();
×
24
  const lang = getLocale(l10n).split("-")[0] ?? "en";
×
25

26
  const getScreenshotImage = (
×
27
    isPremium: boolean,
28
    lang: string,
29
  ): StaticImageData => {
30
    if (lang === "fr") {
×
31
      return PremiumScreenshotFr;
×
32
    }
33
    if (lang === "de") {
×
34
      return PremiumScreenshotDe;
×
35
    }
36
    // If Premium is not availabe in the country,
37
    // show no premium demo phone state
38
    if (!isPremium) {
×
39
      return NoPremiumScreenshot;
×
40
    }
41
    return PremiumScreenshot;
×
42
  };
43

44
  const getForegroundImage = (lang: string): StaticImageData => {
×
45
    if (lang === "fr") {
×
46
      return FgImageFr;
×
47
    }
48
    if (lang === "de") {
×
49
      return FgImageDe;
×
50
    }
51
    return FgImage;
×
52
  };
53

54
  return (
55
    <div className={styles.container}>
56
      <Image src={BgImage} alt="" className={styles.background} />
57

58
      <Image
59
        src={getScreenshotImage(props.premium ?? false, lang)}
×
60
        className={styles.phone}
61
        alt=""
62
      />
63
      <Image
64
        src={getForegroundImage(lang)}
65
        alt=""
66
        className={styles.foreground}
67
      />
68
    </div>
69
  );
70
};
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