- the great reformat

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-02-06 18:23:46 -05:00
parent 3b54fd27bb
commit 4eb8faa5d9
383 changed files with 54009 additions and 52734 deletions

View File

@@ -1,35 +1,35 @@
import EmailActionTypes from "./email.types";
const INITIAL_STATE = {
emailConfig: {
messageOptions: {
from: { name: "ShopName", address: "noreply@romeonline.io" },
to: null,
replyTo: null,
emailConfig: {
messageOptions: {
from: {name: "ShopName", address: "noreply@romeonline.io"},
to: null,
replyTo: null,
},
template: {name: null, variables: {}},
},
template: { name: null, variables: {} },
},
open: false,
error: null,
open: false,
error: null,
};
const emailReducer = (state = INITIAL_STATE, action) => {
switch (action.type) {
case EmailActionTypes.TOGGLE_EMAIL_OVERLAY_VISIBLE:
return {
...state,
open: !state.open,
};
case EmailActionTypes.SET_EMAIL_OPTIONS:
return {
...state,
emailConfig: { ...action.payload },
open: true,
};
default:
return state;
}
switch (action.type) {
case EmailActionTypes.TOGGLE_EMAIL_OVERLAY_VISIBLE:
return {
...state,
open: !state.open,
};
case EmailActionTypes.SET_EMAIL_OPTIONS:
return {
...state,
emailConfig: {...action.payload},
open: true,
};
default:
return state;
}
};
export default emailReducer;