From e9dba5007a6859f5c22c6848bb5345d8a3f6bf66 Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Tue, 28 Jan 2020 09:27:16 -0800 Subject: [PATCH] Update default plugin selection when selected group changes Summary: This diff updates default plugin selected when group selection gets updated. This diff also makes sure that group selection is persisted when swtiching between different tabs. Reviewed By: mweststrate Differential Revision: D19578748 fbshipit-source-id: 6f401248fe32441e30cb5acbb9251e206866984a --- src/reducers/supportForm.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/reducers/supportForm.tsx b/src/reducers/supportForm.tsx index c75a6b45a..d1786c02a 100644 --- a/src/reducers/supportForm.tsx +++ b/src/reducers/supportForm.tsx @@ -15,6 +15,12 @@ type MediaObject = SubmediaType & { description: string; path: string; }; + +export type Groups = + | 'Litho Support' + | 'GraphQL Android Support' + | 'GraphQL iOS Support'; + export type MediaType = Array; export type SupportFormV2State = { title: string; @@ -22,6 +28,7 @@ export type SupportFormV2State = { commitHash: string; screenshots?: MediaType; videos?: MediaType; + selectedGroup: Groups; }; export type SupportFormRequestDetailsState = SupportFormV2State & { @@ -64,6 +71,7 @@ export const initialState: () => State = () => ({ ].join('\n'), commitHash: '', appName: '', + selectedGroup: 'Litho Support', }, }); export default function reducer(