Move supportform related redux property in a different reducer
Summary: This diff moves support form related redux prop to a separate reducer under separate supportForm property. Reviewed By: passy Differential Revision: D18272436 fbshipit-source-id: b64c4e041d8dacd305a71db255752a310a46b0d1
This commit is contained in:
committed by
Facebook Github Bot
parent
9ec4ef67ad
commit
7c69aba8fa
@@ -66,10 +66,6 @@ export type ShareType = {
|
||||
closeOnFinish: boolean;
|
||||
} & SubShareType;
|
||||
|
||||
export type NTUsersFormData = {
|
||||
flipper_trace: string | null;
|
||||
};
|
||||
|
||||
export type State = {
|
||||
leftSidebarVisible: boolean;
|
||||
rightSidebarVisible: boolean;
|
||||
@@ -84,7 +80,6 @@ export type State = {
|
||||
flipperRating: number | null;
|
||||
statusMessages: Array<string>;
|
||||
xcodeCommandLineToolsDetected: boolean;
|
||||
supportForm: {webState: NTUsersFormData} | null;
|
||||
};
|
||||
|
||||
type BooleanActionType =
|
||||
@@ -155,12 +150,6 @@ export type Action =
|
||||
payload: {
|
||||
isDetected: boolean;
|
||||
};
|
||||
}
|
||||
| {
|
||||
type: 'SET_SUPPORT_FORM_STATE';
|
||||
payload: {
|
||||
webState: NTUsersFormData;
|
||||
} | null;
|
||||
};
|
||||
|
||||
export const initialState: () => State = () => ({
|
||||
@@ -183,7 +172,6 @@ export const initialState: () => State = () => ({
|
||||
flipperRating: null,
|
||||
statusMessages: [],
|
||||
xcodeCommandLineToolsDetected: false,
|
||||
supportForm: null,
|
||||
});
|
||||
|
||||
function statusMessage(sender: string, msg: string): string {
|
||||
@@ -297,8 +285,6 @@ export default function reducer(
|
||||
return state;
|
||||
} else if (action.type === 'SET_XCODE_DETECTED') {
|
||||
return {...state, xcodeCommandLineToolsDetected: action.payload.isDetected};
|
||||
} else if (action.type === 'SET_SUPPORT_FORM_STATE') {
|
||||
return {...state, supportForm: action.payload};
|
||||
} else {
|
||||
return state;
|
||||
}
|
||||
@@ -384,10 +370,3 @@ export const setXcodeDetected = (isDetected: boolean): Action => ({
|
||||
type: 'SET_XCODE_DETECTED',
|
||||
payload: {isDetected},
|
||||
});
|
||||
|
||||
export const setSupportFormState = (
|
||||
payload: {webState: NTUsersFormData} | null,
|
||||
): Action => ({
|
||||
type: 'SET_SUPPORT_FORM_STATE',
|
||||
payload,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user