Reformat all project files to use the prettier config file.

This commit is contained in:
Patrick Fic
2024-03-27 15:35:07 -07:00
parent b161530381
commit e1df64d592
873 changed files with 111387 additions and 125473 deletions

View File

@@ -1,24 +1,24 @@
import EmailActionTypes from "./email.types";
export const toggleEmailOverlayVisible = () => ({
type: EmailActionTypes.TOGGLE_EMAIL_OVERLAY_VISIBLE
type: EmailActionTypes.TOGGLE_EMAIL_OVERLAY_VISIBLE
});
export const setEmailOptions = options => ({
type: EmailActionTypes.SET_EMAIL_OPTIONS,
payload: options
export const setEmailOptions = (options) => ({
type: EmailActionTypes.SET_EMAIL_OPTIONS,
payload: options
});
export const sendEmail = email => ({
type: EmailActionTypes.SEND_EMAIL,
payload: email
export const sendEmail = (email) => ({
type: EmailActionTypes.SEND_EMAIL,
payload: email
});
export const sendEmailSuccess = options => ({
type: EmailActionTypes.SEND_EMAIL_SUCCESS
export const sendEmailSuccess = (options) => ({
type: EmailActionTypes.SEND_EMAIL_SUCCESS
});
export const sendEmailFailure = error => ({
type: EmailActionTypes.SEND_EMAIL_FAILURE,
payload: error
export const sendEmailFailure = (error) => ({
type: EmailActionTypes.SEND_EMAIL_FAILURE,
payload: error
});

View File

@@ -2,41 +2,41 @@ import InstanceRenderManager from "../../utils/instanceRenderMgr";
import EmailActionTypes from "./email.types";
const INITIAL_STATE = {
emailConfig: {
messageOptions: {
from: {
name: "ShopName",
address: InstanceRenderManager({
imex: "noreply@iemx.online",
rome: "noreply@romeonline.io",
}),
},
to: null,
replyTo: null,
},
template: { name: null, variables: {} },
emailConfig: {
messageOptions: {
from: {
name: "ShopName",
address: InstanceRenderManager({
imex: "noreply@iemx.online",
rome: "noreply@romeonline.io"
})
},
to: null,
replyTo: null
},
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;

View File

@@ -1,4 +1,4 @@
import {all} from "redux-saga/effects";
import { all } from "redux-saga/effects";
// import { sendEmailFailure, sendEmailSuccess } from "./email.actions";
// import { renderTemplate } from "../application/application.actions";
// import EmailActionTypes from "./email.types";
@@ -57,10 +57,10 @@ import {all} from "redux-saga/effects";
// }
export function* emailSagas() {
yield all([
// call(onSendEmail),
// call(onSendEmailFailure),
// call(onSendEmailSuccess)
//call(onSetEmailOptions),
]);
yield all([
// call(onSendEmail),
// call(onSendEmailFailure),
// call(onSendEmailSuccess)
//call(onSetEmailOptions),
]);
}

View File

@@ -1,13 +1,7 @@
import {createSelector} from "reselect";
import { createSelector } from "reselect";
const selectEmail = (state) => state.email;
export const selectEmailVisible = createSelector(
[selectEmail],
(email) => email.open
);
export const selectEmailVisible = createSelector([selectEmail], (email) => email.open);
export const selectEmailConfig = createSelector(
[selectEmail],
(email) => email.emailConfig
);
export const selectEmailConfig = createSelector([selectEmail], (email) => email.emailConfig);

View File

@@ -1,8 +1,8 @@
const EmailActionTypes = {
TOGGLE_EMAIL_OVERLAY_VISIBLE: "TOGGLE_EMAIL_OVERLAY_VISIBLE",
SET_EMAIL_OPTIONS: "SET_EMAIL_OPTIONS",
SEND_EMAIL: "SEND_EMAIL",
SEND_EMAIL_SUCCESS: "SEND_EMAIL_SUCCESS",
SEND_EMAIL_FAILURE: "SEND_EMAIL_FAILURE"
TOGGLE_EMAIL_OVERLAY_VISIBLE: "TOGGLE_EMAIL_OVERLAY_VISIBLE",
SET_EMAIL_OPTIONS: "SET_EMAIL_OPTIONS",
SEND_EMAIL: "SEND_EMAIL",
SEND_EMAIL_SUCCESS: "SEND_EMAIL_SUCCESS",
SEND_EMAIL_FAILURE: "SEND_EMAIL_FAILURE"
};
export default EmailActionTypes;