PromucFlow_constructor/app/client/src/reducers/uiReducers/analyticsReducer.ts
Ankita Kinger ae05e93ec9
chore: Removing feature flag for app level invites (#22650)
## Description

Removing feature flag for app-level invites. Also, updating import
statements to use `@appsmith/..` instead of `ce/..`

Fixes [#22657](https://github.com/appsmithorg/appsmith/issues/22657)

## Type of change
- Chore (housekeeping or task changes that don't impact user perception)


## How Has This Been Tested?
- Manual
- Jest
- Cypress

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-04-26 12:48:16 +05:30

38 lines
875 B
TypeScript

import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
import { createReducer } from "utils/ReducerUtils";
export type SegmentState = "INIT_SUCCESS" | "INIT_UNCERTAIN";
export const initialState: AnalyticsReduxState = {
telemetry: {},
};
export interface AnalyticsReduxState {
telemetry: {
segmentState?: SegmentState;
};
}
export const handlers = {
[ReduxActionTypes.SEGMENT_INITIALIZED]: (
state: AnalyticsReduxState,
): AnalyticsReduxState => ({
...state,
telemetry: {
...state.telemetry,
segmentState: "INIT_SUCCESS",
},
}),
[ReduxActionTypes.SEGMENT_INIT_UNCERTAIN]: (
state: AnalyticsReduxState,
): AnalyticsReduxState => ({
...state,
telemetry: {
...state.telemetry,
segmentState: "INIT_UNCERTAIN",
},
}),
};
export default createReducer(initialState, handlers);