Add logic in DE to show NPS Survey (#1565)

* Send messages from DE to Portal to display NPS Survey

* Address comments
This commit is contained in:
sindhuba
2023-08-04 13:24:30 -07:00
committed by GitHub
parent 5f0c7bcea2
commit 92f43c28a7
4 changed files with 50 additions and 2 deletions

View File

@@ -1425,6 +1425,10 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
this.setState({ isExecuting: false });
TelemetryProcessor.traceSuccess(Action.CreateCollection, telemetryData, startKey);
useSidePanel.getState().closeSidePanel();
// open NPS Survey Dialog once the collection is created
if (userContext.features.enableNPSSurvey) {
this.props.explorer.openNPSSurveyDialog();
}
} catch (error) {
const errorMessage: string = getErrorMessage(error);
this.setState({ isExecuting: false, errorMessage, showErrorDetails: true });