forked from mozilla/experimenter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rapid exp title changes dependent on new or edit fixes mozilla#2901
- Loading branch information
Showing
3 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
app/experimenter/static/rapid/components/experiments/ExperimentEditHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from "react"; | ||
|
||
import { useHistory } from "react-router-dom"; | ||
import { useExperimentState } from "experimenter-rapid/contexts/experiment/hooks"; | ||
|
||
const ExperimentFormPage: React.FC = () => { | ||
const { location } = useHistory(); | ||
let pageHeading = "Create a New A/A Experiment"; | ||
if (location.pathname.includes("edit")) { | ||
const experimentData = useExperimentState(); | ||
pageHeading = `Edit Experiment: ${experimentData.name}`; | ||
} | ||
return ( | ||
<div className="mb-4"> | ||
<div className="d-flex align-items-center"> | ||
<h3 className="mr-3">{pageHeading}</h3> | ||
<span className="badge badge-secondary mb-1">Draft</span> | ||
</div> | ||
<p> | ||
Create and automatically launch an A/A CFR experiment. A/A experiments | ||
measure the accuracy of the tool. | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ExperimentFormPage; |
24 changes: 11 additions & 13 deletions
24
app/experimenter/static/rapid/components/pages/ExperimentFormPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters