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

mozilla / fx-private-relay / d4d9f278-d845-4992-8c81-4f3757c427a1

08 Sep 2025 02:07PM UTC coverage: 86.303% (-1.8%) from 88.121%
d4d9f278-d845-4992-8c81-4f3757c427a1

Pull #5842

circleci

joeherm
fix(deploy): Update CircleCI to use common Dockerfile for building frontend
Pull Request #5842: fix(deploy): Unify Dockerfiles

2744 of 3951 branches covered (69.45%)

Branch coverage included in aggregate %.

17910 of 19981 relevant lines covered (89.64%)

9.96 hits per line

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

75.0
/frontend/src/components/dashboard/subdomain/ConfirmationForm.tsx
1
import styles from "./ConfirmationForm.module.scss";
1✔
2
import { Button } from "../../Button";
1✔
3
import { FormEventHandler, useRef, useState } from "react";
1✔
4
import { useButton } from "react-aria";
1✔
5
import { useL10n } from "../../../hooks/l10n";
1✔
6
import { Localized } from "../../Localized";
1✔
7

8
export type Props = {
9
  subdomain: string;
10
  onConfirm: () => void;
11
  onCancel: () => void;
12
};
13

14
/**
15
 * Form to ask the user whether they're sure about their chosen domain, because it's permanent.
16
 *
17
 * Primarily used in {@link ConfirmationModal}.
18
 */
19
export const SubdomainConfirmationForm = (props: Props) => {
2✔
20
  const l10n = useL10n();
2✔
21
  const [confirmCheckbox, setConfirmCheckbox] = useState(false);
2✔
22
  const cancelButtonRef = useRef<HTMLButtonElement>(null);
2✔
23
  const cancelButton = useButton(
2✔
24
    { onPress: () => props.onCancel() },
×
25
    cancelButtonRef,
26
  );
27

28
  const onSubmit: FormEventHandler = (event) => {
2✔
29
    event.preventDefault();
×
30

31
    props.onConfirm();
×
32
  };
33

34
  return (
35
    <>
36
      <p className={styles["permanence-warning"]}>
37
        <Localized
38
          id="modal-email-domain-available-body"
39
          elems={{
40
            p: <p />,
41
          }}
42
        >
43
          <span />
44
        </Localized>
45
      </p>
46
      <form onSubmit={onSubmit} className={styles.confirm}>
47
        <label>
48
          <input
49
            type="checkbox"
50
            name="confirmSubdomain"
51
            id="confirmSubdomain"
52
            checked={confirmCheckbox}
53
            onChange={(e) => setConfirmCheckbox(e.target.checked)}
×
54
            required={true}
55
          />
56
          <Localized
57
            id="modal-domain-register-confirmation-checkbox-2"
58
            vars={{
59
              subdomain: props.subdomain,
60
            }}
61
            elems={{
62
              subdomain: <span className={styles.subdomain} />,
63
            }}
64
          >
65
            <span />
66
          </Localized>
67
        </label>
68
        <div className={styles.buttons}>
69
          <button
70
            {...cancelButton.buttonProps}
71
            ref={cancelButtonRef}
72
            className={styles["cancel-button"]}
73
          >
74
            {l10n.getString("modal-email-domain-cancel")}
75
          </button>
76
          <Button type="submit" disabled={!confirmCheckbox}>
77
            {l10n.getString("modal-email-domain-register")}
78
          </Button>
79
        </div>
80
      </form>
81
    </>
82
  );
83
};
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