Skip to content

Commit

Permalink
10553: remove unused socket message;
Browse files Browse the repository at this point in the history
  • Loading branch information
nechama-krigsman committed Dec 4, 2024
1 parent bbf3786 commit 09ef490
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 44 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import { TROUBLESHOOTING_INFO } from '@shared/business/entities/EntityConstants';
import { state } from '@web-client/presenter/app.cerebral';
import React from 'react';

const successAlertMessage = {
message: 'Your email address is verified. You can now log in to DAWSON.',
title: 'Email address verified',
};

const expiredTokenAlertError = {
message: (
<>
Expand All @@ -31,18 +25,6 @@ export const genericAlertError = {
title: 'Unable to complete your request',
};

type VerifyEmailNotificationType = 'success' | 'expiredToken';

const alertDictionary: { [key in VerifyEmailNotificationType]: any } = {
expiredToken: expiredTokenAlertError,
success: successAlertMessage,
};

const alertKeyDictionary: { [key in VerifyEmailNotificationType]: any } = {
expiredToken: 'alertWarning',
success: 'alertSuccess',
};

export const verifyUserPendingEmailAction = async ({
applicationContext,
path,
Expand Down Expand Up @@ -71,24 +53,9 @@ export const verifyUserPendingEmailAction = async ({
});
}

//if timout display new message
//if timeout display new message
return path.error({
alertError: genericAlertError,
});
}
};

//DELETE AND CLEAN UP SOCKET ROUTER
export const setVerifyUserPendingEmailNotificationAction = ({
props,
store,
}: ActionProps<{ messageType: VerifyEmailNotificationType }>) => {
const { messageType } = props;
store.unset(state.alertWarning);
store.unset(state.alertSuccess);
store.unset(state.alertInfo);

const KEY = alertKeyDictionary[messageType] || 'alertWarning';
const MESSAGE = alertDictionary[messageType] || genericAlertError;
store.set(state[KEY], MESSAGE);
};
2 changes: 0 additions & 2 deletions web-client/src/presenter/presenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ import { setSelectedMessagesSequence } from './sequences/setSelectedMessagesSequ
import { setTrialSessionCalendarErrorSequence } from '@web-client/presenter/sequences/setTrialSessionCalendarErrorSequence';
import { setTrialSessionCalendarSequence } from './sequences/setTrialSessionCalendarSequence';
import { setTrialSessionsFiltersSequence } from '@web-client/presenter/sequences/setTrialSessionsFiltersSequence';
import { setVerifyEmailNotificationSequence } from '@web-client/presenter/sequences/setVerifyEmailNotificationSequence';
import { setViewerCorrespondenceToDisplaySequence } from './sequences/setViewerCorrespondenceToDisplaySequence';
import { setViewerDocumentToDisplaySequence } from './sequences/setViewerDocumentToDisplaySequence';
import { setViewerDraftDocumentToDisplaySequence } from './sequences/setViewerDraftDocumentToDisplaySequence';
Expand Down Expand Up @@ -1277,7 +1276,6 @@ export const presenterSequences = {
setTrialSessionCalendarErrorSequence,
setTrialSessionCalendarSequence,
setTrialSessionsFiltersSequence,
setVerifyEmailNotificationSequence,
setViewerCorrespondenceToDisplaySequence:
setViewerCorrespondenceToDisplaySequence as unknown as Function,
setViewerDocumentToDisplaySequence:
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions web-client/src/providers/socketRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ export const socketRouter = (app, onMessageCallbackFn?) => {
case 'download_csv_file':
await app.getSequence('downloadCsvFileSequence')(message);
break;
case 'set_verify_email_notification':
await app.getSequence('setVerifyEmailNotificationSequence')(message);
break;
}

(onMessageCallbackFn || noop)(message);
Expand Down

0 comments on commit 09ef490

Please sign in to comment.