@@ -6,9 +6,10 @@ import { testVariationService } from "../services";
66import { Container , Box , Grid , Typography } from "@material-ui/core" ;
77import ProjectSelect from "../components/ProjectSelect" ;
88import Filters from "../components/Filters" ;
9+ import { TestVariationMergeForm } from "../components/TestVariationMergeForm" ;
910
1011const TestVariationListPage : React . FunctionComponent = ( ) => {
11- const { projectId } = useParams ( ) ;
12+ const { projectId = "" } = useParams ( ) ;
1213 const [ testVariations , setTestVariations ] = React . useState < TestVariation [ ] > (
1314 [ ]
1415 ) ;
@@ -54,17 +55,23 @@ const TestVariationListPage: React.FunctionComponent = () => {
5455 < ProjectSelect selectedId = { projectId } />
5556 </ Grid >
5657 < Grid item >
57- < Box m = { 2 } >
58- < Filters
59- items = { testVariations }
60- queryState = { [ query , setQuery ] }
61- osState = { [ os , setOs ] }
62- deviceState = { [ device , setDevice ] }
63- browserState = { [ browser , setBrowser ] }
64- viewportState = { [ viewport , setViewport ] }
65- branchNameState = { [ branchName , setBranchName ] }
66- />
67- </ Box >
58+ < TestVariationMergeForm
59+ projectId = { projectId }
60+ items = { Array . from (
61+ new Set ( testVariations . map ( ( t ) => t . branchName ) )
62+ ) }
63+ />
64+ </ Grid >
65+ < Grid item >
66+ < Filters
67+ items = { testVariations }
68+ queryState = { [ query , setQuery ] }
69+ osState = { [ os , setOs ] }
70+ deviceState = { [ device , setDevice ] }
71+ browserState = { [ browser , setBrowser ] }
72+ viewportState = { [ viewport , setViewport ] }
73+ branchNameState = { [ branchName , setBranchName ] }
74+ />
6875 </ Grid >
6976 < Grid item >
7077 < TestVariationList items = { filteredItems } />
0 commit comments