@openlettermarketing/olc-react-sdk 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/build/index.js +3 -3
  2. package/build/index.js.map +1 -1
  3. package/build/types/App.d.ts +1 -0
  4. package/build/types/components/TemplateBuilder/index.d.ts +1 -0
  5. package/build/types/components/TopNavigation/index.d.ts +1 -0
  6. package/build/types/index.d.ts +3 -2
  7. package/package.json +1 -1
  8. package/.eslintignore +0 -1
  9. package/.eslintrc.cjs +0 -18
  10. package/.eslintrc.yml +0 -47
  11. package/.prettierignore +0 -3
  12. package/.prettierrc.yml +0 -5
  13. package/CHANGELOG.md +0 -4
  14. package/babel.config.json +0 -10
  15. package/examples/.eslintrc.yml +0 -4
  16. package/index.html +0 -18
  17. package/public/vite.svg +0 -1
  18. package/src/App.tsx +0 -72
  19. package/src/assets/Fonts/Lexi-Regular.ttf +0 -0
  20. package/src/assets/images/input/cancel.tsx +0 -20
  21. package/src/assets/images/input/search.tsx +0 -20
  22. package/src/assets/images/modal-icons/cancelIcon.png +0 -0
  23. package/src/assets/images/modal-icons/del.tsx +0 -19
  24. package/src/assets/images/modal-icons/delete.svg +0 -3
  25. package/src/assets/images/modal-icons/modal-cross.tsx +0 -23
  26. package/src/assets/images/modal-icons/save.tsx +0 -23
  27. package/src/assets/images/templates/add-icon.svg +0 -5
  28. package/src/assets/images/templates/back-arrow.tsx +0 -19
  29. package/src/assets/images/templates/back-dialog-icon.png +0 -0
  30. package/src/assets/images/templates/back-dialog-icon.svg +0 -3
  31. package/src/assets/images/templates/barcode.png +0 -0
  32. package/src/assets/images/templates/bi-fold-self-mailers.tsx +0 -28
  33. package/src/assets/images/templates/black-trash-icon.svg +0 -3
  34. package/src/assets/images/templates/cancel.svg +0 -4
  35. package/src/assets/images/templates/cancelIcon.png +0 -0
  36. package/src/assets/images/templates/clipboard.svg +0 -3
  37. package/src/assets/images/templates/contact-search.svg +0 -3
  38. package/src/assets/images/templates/content-copy-icon.tsx +0 -24
  39. package/src/assets/images/templates/cross.svg +0 -3
  40. package/src/assets/images/templates/custom-template-icon-black.svg +0 -3
  41. package/src/assets/images/templates/custom-template-icon.svg +0 -3
  42. package/src/assets/images/templates/custom-template.tsx +0 -23
  43. package/src/assets/images/templates/dummy-template.svg +0 -21
  44. package/src/assets/images/templates/dynamic-field.tsx +0 -119
  45. package/src/assets/images/templates/edit-pencil-icon.tsx +0 -21
  46. package/src/assets/images/templates/filter-2.svg +0 -13
  47. package/src/assets/images/templates/info-icon.svg +0 -12
  48. package/src/assets/images/templates/info-icon.tsx +0 -37
  49. package/src/assets/images/templates/one-barcode.png +0 -0
  50. package/src/assets/images/templates/personal-letter.tsx +0 -53
  51. package/src/assets/images/templates/plus-icon.svg +0 -5
  52. package/src/assets/images/templates/postcard.tsx +0 -32
  53. package/src/assets/images/templates/professional-letter.tsx +0 -53
  54. package/src/assets/images/templates/real-penned-letters.tsx +0 -57
  55. package/src/assets/images/templates/search.svg +0 -3
  56. package/src/assets/images/templates/size-image-lg.tsx +0 -20
  57. package/src/assets/images/templates/size-image-mid.tsx +0 -20
  58. package/src/assets/images/templates/size-image.tsx +0 -20
  59. package/src/assets/images/templates/template-copy.svg +0 -3
  60. package/src/assets/images/templates/template-default-design.tsx +0 -21
  61. package/src/assets/images/templates/template-delete.svg +0 -3
  62. package/src/assets/images/templates/template-edit.svg +0 -4
  63. package/src/assets/images/templates/template-save-icon.svg +0 -3
  64. package/src/assets/images/templates/template-search-2.svg +0 -9
  65. package/src/assets/images/templates/template-search.svg +0 -4
  66. package/src/assets/images/templates/thumbnail.svg +0 -10
  67. package/src/assets/images/templates/trash-icon.svg +0 -13
  68. package/src/assets/images/templates/tri-fold-self-mailers.tsx +0 -93
  69. package/src/components/CreateTemplate/index.tsx +0 -379
  70. package/src/components/CreateTemplate/styles.scss +0 -363
  71. package/src/components/GenericUIBlocks/Button/index.tsx +0 -21
  72. package/src/components/GenericUIBlocks/Button/styles.scss +0 -15
  73. package/src/components/GenericUIBlocks/CircularProgress/index.tsx +0 -18
  74. package/src/components/GenericUIBlocks/CircularProgress/styles.scss +0 -98
  75. package/src/components/GenericUIBlocks/Dialog/index.tsx +0 -127
  76. package/src/components/GenericUIBlocks/Dialog/styles.scss +0 -106
  77. package/src/components/GenericUIBlocks/Divider/index.tsx +0 -12
  78. package/src/components/GenericUIBlocks/Divider/styles.scss +0 -7
  79. package/src/components/GenericUIBlocks/GeneralSelect/index.tsx +0 -86
  80. package/src/components/GenericUIBlocks/GeneralSelect/styles.scss +0 -77
  81. package/src/components/GenericUIBlocks/GeneralTooltip/index.tsx +0 -24
  82. package/src/components/GenericUIBlocks/GeneralTooltip/styles.scss +0 -9
  83. package/src/components/GenericUIBlocks/GenericSnackbar/index.tsx +0 -53
  84. package/src/components/GenericUIBlocks/GenericSnackbar/styles.scss +0 -34
  85. package/src/components/GenericUIBlocks/Grid/index.tsx +0 -82
  86. package/src/components/GenericUIBlocks/Input/index.tsx +0 -89
  87. package/src/components/GenericUIBlocks/Input/styles.scss +0 -80
  88. package/src/components/GenericUIBlocks/Typography/index.tsx +0 -18
  89. package/src/components/GenericUIBlocks/Typography/styles.scss +0 -27
  90. package/src/components/SidePanel/customFields/customFieldSection.tsx +0 -173
  91. package/src/components/SidePanel/customFields/styles.scss +0 -47
  92. package/src/components/SidePanel/index.tsx +0 -42
  93. package/src/components/SidePanel/templates/customTemplateSection.tsx +0 -503
  94. package/src/components/SidePanel/templates/styles.scss +0 -151
  95. package/src/components/TemplateBuilder/index.tsx +0 -301
  96. package/src/components/TemplateBuilder/styles.scss +0 -66
  97. package/src/components/TopNavigation/ConfirmNavigateDialog/index.tsx +0 -58
  98. package/src/components/TopNavigation/ConfirmNavigateDialog/styles.scss +0 -123
  99. package/src/components/TopNavigation/EditTemplateNameModel/index.tsx +0 -98
  100. package/src/components/TopNavigation/EditTemplateNameModel/styles.scss +0 -88
  101. package/src/components/TopNavigation/SaveTemplateModel/index.tsx +0 -60
  102. package/src/components/TopNavigation/SaveTemplateModel/styles.scss +0 -128
  103. package/src/components/TopNavigation/index.tsx +0 -405
  104. package/src/components/TopNavigation/styles.scss +0 -83
  105. package/src/importMeta.d.ts +0 -9
  106. package/src/index.scss +0 -137
  107. package/src/index.tsx +0 -80
  108. package/src/libs/test.ts +0 -7
  109. package/src/redux/actions/action-types.ts +0 -42
  110. package/src/redux/actions/customFieldAction.ts +0 -28
  111. package/src/redux/actions/snackbarActions.ts +0 -16
  112. package/src/redux/actions/templateActions.ts +0 -456
  113. package/src/redux/reducers/customFieldReducer.ts +0 -97
  114. package/src/redux/reducers/index.ts +0 -14
  115. package/src/redux/reducers/snackbarReducer.ts +0 -41
  116. package/src/redux/reducers/templateReducer.ts +0 -353
  117. package/src/redux/store.ts +0 -18
  118. package/src/styles/colors.scss +0 -61
  119. package/src/test/mocks.js +0 -89
  120. package/src/test/setupJest.js +0 -1
  121. package/src/utils/api.ts +0 -36
  122. package/src/utils/constants.ts +0 -40
  123. package/src/utils/customStyles.ts +0 -135
  124. package/src/utils/fetchWrapper.ts +0 -68
  125. package/src/utils/fonts.json +0 -1597
  126. package/src/utils/helper.ts +0 -19
  127. package/src/utils/local-storage.ts +0 -15
  128. package/src/utils/message.ts +0 -71
  129. package/src/utils/template-builder.ts +0 -147
  130. package/src/utils/templateRestrictedArea/biFold.ts +0 -433
  131. package/src/utils/templateRestrictedArea/postCard.ts +0 -439
  132. package/src/utils/templateRestrictedArea/professional.ts +0 -422
  133. package/src/utils/templateRestrictedArea/realPenned.ts +0 -244
  134. package/src/utils/templateRestrictedArea/triFold.ts +0 -434
  135. package/tsconfig.json +0 -29
  136. package/tsconfig.node.json +0 -12
  137. package/vite.config.ts +0 -8
  138. package/webpack.config.js +0 -80
@@ -1,83 +0,0 @@
1
- .top-navigation-container {
2
- position: absolute;
3
- width: 100%;
4
- padding: 23px 20px;
5
- height: 100%;
6
- max-height: 70px;
7
- background: var(--topbarBgColor);
8
- margin: 0;
9
- top: 0;
10
- // z-index: 999;
11
- display: flex;
12
- justify-content: center;
13
- align-items: center;
14
- border-bottom: 0.5px solid var(--borderColor);
15
-
16
- .middle {
17
- display: flex;
18
- justify-content: center;
19
- align-items: center;
20
- gap: 5px;
21
- p {
22
- text-align: center;
23
- margin-bottom: 0px;
24
- font-size: 16px;
25
- font-weight: 500;
26
- text-overflow: ellipsis;
27
- white-space: nowrap;
28
- overflow: hidden;
29
- color: var(--textColor);
30
- }
31
- div{
32
- display: flex;
33
- justify-content: center;
34
- align-items: center;
35
- cursor: pointer;
36
- border-radius: 50%;
37
- padding: 5px;
38
- transition: 0.1s ease-in-out all;
39
- &:hover {
40
- background-color: var(--iconHoverBgColor);
41
- }
42
- svg{
43
- fill: var(--textColor);
44
- }
45
- }
46
- }
47
-
48
- & button {
49
- max-width: 120px !important;
50
- text-transform: capitalize;
51
- color: var(--textColor);
52
- font-size: 14px;
53
- font-style: normal;
54
- font-weight: 500;
55
- line-height: normal;
56
- }
57
-
58
- & .MuiGrid-item {
59
- padding-top: 0 !important;
60
- }
61
-
62
- & .left {
63
- justify-content: flex-start !important;
64
- }
65
-
66
- & .right {
67
- gap: 10px !important;
68
- }
69
-
70
- .actionsBtnWrapper {
71
- display: flex;
72
- justify-content: flex-end;
73
- align-items: center;
74
- flex-wrap: wrap;
75
- }
76
-
77
- .templateCreateBtn {
78
- display: flex;
79
- justify-content: center;
80
- align-items: center;
81
- gap: 5px;
82
- }
83
- }
@@ -1,9 +0,0 @@
1
- interface ImportMetaEnv {
2
- readonly VITE_APP_ACCESS_TOKEN: string;
3
- readonly VITE_APP_PLOTNO_API_KEY: string;
4
- // Add other environment variables here if needed
5
- }
6
-
7
- interface ImportMeta {
8
- readonly env: ImportMetaEnv;
9
- }
package/src/index.scss DELETED
@@ -1,137 +0,0 @@
1
- :root {
2
- // scroll bars colors
3
- --sb-track-color: #fff8ee;
4
- --sb-thumb-color: hsl(29, 100%, 88%);
5
- // primary color
6
- --primaryColor: #ed5c2f;
7
- --svgColor: #fdb515;
8
- --svgColorSecondary: #ed5c2f;
9
- // main background color
10
- --mainBackgroundColor: #ffffff;
11
- // text colors
12
- --textColor: #000;
13
- // product Card Background color
14
- --productCardBgColor: #fff;
15
- --productCardBackgroundColorActive: #fff8ee;
16
- // post Card Background colors
17
- --postCardBgColor: #fff;
18
- --postCardBackgroundColorActive: #fff8ee;
19
- --postCardSVGColor: #fdecd3;
20
- // input colors
21
- --inputBgColor: #fff;
22
- --inputTextColor: #000;
23
- --inputBorderColor: #303030;
24
- --inputSearchAppliedBg: #fff8ee;
25
- --inputSearchIcon: #303030;
26
- // select input & option colors
27
- --selectBgColor: transparent;
28
- --selectTextColor: #000;
29
- --selectBorderColor: #303030;
30
- --selectMenuBgColor: #fff;
31
- --selectOptionTextColor: #000;
32
- --selectOptionBorderColor: #5454544d;
33
- --selectOptionFocusedColor: #fff8ee;
34
- --selectOptionFocusedTextColor: #000;
35
- --selectOptionSelectedColor: #fff8ee;
36
- --selectOptionSelectedTextColor: #000;
37
- --selectOptionSelectedBg: #fff8ee;
38
- // template builder colors
39
- --topbarBgColor: #fff;
40
- --sidepanelBgColor: #fff;
41
- --sidepanelTextColor: #303030;
42
- --sidepanelSVGColor: #303030;
43
- --sidepanelSVGColorActive: #ed5c2f;
44
- --sidepanelOptionHoverColor: #fff8ee;
45
- --sidepanelTextColorHover: #ed5c2f;
46
- // custom fields colors
47
- --customFieldBorderColor: #303030;
48
- --customFieldTextColor: #303030;
49
- --customFieldCopySVGColor: #303030;
50
- // builder Layer colors
51
- --cardBgColor: transparent;
52
- --cardTextColor: #000;
53
- // dialog Modal colors
54
- --dialogModalBgColor: #fff8ee;
55
- --dialogModalHeadingColor: #ed5c2f;
56
- --dialogModalTextColor: #000;
57
- --dialogModalSVGColor: #ed5c2f;
58
- // border colors
59
- --borderColor: rgba(0, 0, 0, 0.5);
60
- // button colors
61
- --secondaryButtonBgColor: #fff;
62
- --secondaryButtonTextColor: #000;
63
- --primaryButtonBgColor: #ed5c2f;
64
- --primaryButtonTextColor: #fff;
65
- // topbar colors
66
- --iconHoverBgColor: rgba(0, 0, 0, 0.076);
67
- // footer bg color
68
- --footerBgColor: #fff;
69
- // red shades
70
- --red: #ff0000;
71
-
72
- body {
73
- font-family: 'Inter', sans-serif !important;
74
- padding: 70px 0 0;
75
- margin: 0;
76
-
77
- &::-webkit-scrollbar {
78
- width: 10px;
79
- }
80
-
81
- &::-webkit-scrollbar-track {
82
- background: var(--sb-track-color) !important;
83
- border-radius: 3px;
84
- }
85
-
86
- &::-webkit-scrollbar-thumb {
87
- background: var(--sb-thumb-color) !important;
88
- border-radius: 3px;
89
- }
90
-
91
- @supports not selector(::-webkit-scrollbar) {
92
- body {
93
- scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
94
- }
95
- }
96
-
97
- .bp5-navbar {
98
- z-index: 10;
99
- color: var(--textColor);
100
- background-color: var(--mainBackgroundColor);
101
- .bp5-card {
102
- color: var(--cardTextColor);
103
- background-color: var(--cardBgColor);
104
- }
105
- .polotno-close-panel .bp5-button-text {
106
- color: var(--textColor);
107
- }
108
- }
109
-
110
- .go4160152499,
111
- .polotno-workspace-inner,
112
- .polotno-panel-container,
113
- .polotno-panel-container > div,
114
- .polotno-panel-container > div > div,
115
- .polotno-panel-container > div > div > div {
116
- &::-webkit-scrollbar {
117
- width: 10px;
118
- }
119
-
120
- &::-webkit-scrollbar-track {
121
- background: var(--sb-track-color) !important;
122
- border-radius: 3px;
123
- }
124
-
125
- &::-webkit-scrollbar-thumb {
126
- background: var(--sb-thumb-color) !important;
127
- border-radius: 3px;
128
- }
129
-
130
- @supports not selector(::-webkit-scrollbar) {
131
- body {
132
- scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
133
- }
134
- }
135
- }
136
- }
137
- }
package/src/index.tsx DELETED
@@ -1,80 +0,0 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom/client';
3
- import { setApiKey, setMode } from './utils/helper';
4
- import { BrowserRouter as Router } from 'react-router-dom';
5
- import { Provider } from 'react-redux';
6
- import store from './redux/store';
7
- import App from './App';
8
- import './index.scss';
9
-
10
- // fonts
11
- import '@fontsource/inter/400.css';
12
- import '@fontsource/inter/700.css';
13
- import '@fontsource/inter/600.css';
14
- import '@fontsource/inter/500.css';
15
-
16
- // utils
17
- import { CustomCSSProperties } from './utils/customStyles';
18
-
19
- interface TemplateBuilderProps {
20
- container: HTMLElement | null;
21
- apiKey: string;
22
- mode: 'test' | 'live';
23
- secretKey: string;
24
- returnRoute?: string | null;
25
- styles?: {
26
- root?: CustomCSSProperties;
27
- };
28
- }
29
-
30
- const TemplateBuilder = ({
31
- container,
32
- apiKey,
33
- secretKey,
34
- mode,
35
- returnRoute,
36
- styles,
37
- }: TemplateBuilderProps): void => {
38
- if (!container) {
39
- throw new Error('Root element not found');
40
- }
41
- if (!apiKey) {
42
- throw new Error('apiKey not found');
43
- }
44
- if (!secretKey) {
45
- throw new Error('secretKey not found');
46
- }
47
- setApiKey(apiKey);
48
- setMode(mode);
49
- const root = ReactDOM.createRoot(container);
50
- root.render(
51
- <>
52
- <Provider store={store}>
53
- <Router>
54
-
55
- <App
56
- secretKey={secretKey}
57
- styles={styles}
58
- returnRoute={returnRoute} />
59
- </Router>
60
- </Provider>
61
- </>
62
- );
63
- };
64
-
65
- // Example to run the project locally for development. Comment out these lines when building the application
66
-
67
- // const rootElement = document.getElementById('root');
68
- // if (rootElement) {
69
- // TemplateBuilder({
70
- // container: rootElement,
71
- // apiKey: import.meta.env.VITE_APP_ACCESS_TOKEN,
72
- // mode: 'live',
73
- // secretKey: import.meta.env.VITE_APP_PLOTNO_API_KEY,
74
- // styles: {}
75
- // });
76
- // } else {
77
- // console.error("Root element '#root' not found in the document.");
78
- // }
79
-
80
- export default TemplateBuilder;
package/src/libs/test.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Add two numbers.
3
- * @param a - The first number
4
- * @param b - The second number
5
- * @returns Returns the sum of the two numbers.
6
- */
7
- export const addTwoNumbers = (a: number, b: number): number => a + b;
@@ -1,42 +0,0 @@
1
- // Snakbar Actions
2
- export const SET_SUCCESS_SNACKBAR = 'SET_SUCCESS_SNACKBAR';
3
- export const SET_ERROR_SNACKBAR = 'SET_ERROR_SNACKBAR';
4
- export const CLEAR_SNACKBAR = 'CLEAR_SNACKBAR';
5
-
6
- //Template Builder Actions
7
- export const SET_DYNAMIC_FIELD_VALUE: string = 'SET_DYNAMIC_FIELD_VALUE';
8
- export const SET_DYNAMIC_FIELDS: string = 'SET_DYNAMIC_FIELDS';
9
- export const UPDATE_DYNAMIC_FIELDS: string = 'UPDATE_DYNAMIC_FIELDS';
10
- export const UPDATE_CONTACT_FIELDS: string = 'UPDATE_CONTACT_FIELDS';
11
- export const REMOVE_FROM_DYNAMIC_FIELDS: string = 'REMOVE_FROM_DYNAMIC_FIELDS';
12
- export const GET_PRODUCTS: string = 'GET_PRODUCTS';
13
- export const CLEAR_DYNAMIC_FIELDS: string = 'CLEAR_DYNAMIC_FIELDS';
14
- export const CLEAR_FIELDS: string = 'CLEAR_FIELDS';
15
-
16
- // Templates Action
17
- export const GET_ALL_TEMPLATES: string = 'GET_ALL_TEMPLATES';
18
- export const GET_ONE_TEMPLATE: string = 'GET_ONE_TEMPLATE';
19
- export const TEMPLATE_LOADING: string = 'TEMPLATE_LOADING';
20
- export const TEMPLATE_PAGINATION_CHANGE: string = 'TEMPLATE_PAGINATION_CHANGE';
21
- export const TEMPLATE_SEARCH: string = 'TEMPLATE_SEARCH';
22
- export const CLEAR_ALL_TEMPLATE: string = 'CLEAR_ALL_TEMPLATE';
23
- export const CLEAR_TEMPLATE_FIELDS: string = 'CLEAR_TEMPLATE_FIELDS';
24
- export const GET_DYNAMIC_FIELDS_FROM_SERVER: string = 'GET_DYNAMIC_FIELDS_FROM_SERVER';
25
- export const LOAD_DATA_FROM_LOCAL_STORAGE: string = 'LOAD_DATA_FROM_LOCAL_STORAGE';
26
- export const CLEAR_TEMPLATE: string = 'CLEAR_TEMPLATE';
27
-
28
- //Product
29
- export const SELECT_PRODUCT: string = 'SELECT_PRODUCT';
30
- export const SELECT_POSTCARD: string = 'SELECT_POSTCARD';
31
-
32
- // Product Actions
33
- export const SET_PRODUCT_TYPES: string = 'SET_PRODUCT_TYPES';
34
- export const SET_PRODUCT_DETAILS: string = 'SET_PRODUCT_DETAILS';
35
- export const SET_PRODUCTS_DATA: string = 'SET_PRODUCTS_DATA';
36
-
37
- export const CLEAR_REDUX: string = 'CLEAR_REDUX';
38
-
39
-
40
- // TODO : Replace these with current ones
41
- export const FETCH_TEMPLATES_REQUEST: string = 'FETCH_TEMPLATES_REQUEST';
42
- export const SET_TEMPLATES: string = 'SET_TEMPLATES';
@@ -1,28 +0,0 @@
1
- import { AppDispatch } from '../store';
2
- import { get } from '../../utils/api';
3
-
4
- export const FETCH_CUSTOM_FIELDS_REQUEST = 'FETCH_CUSTOM_FIELDS_REQUEST';
5
- export const SET_CUSTOM_FIELDS = 'SET_CUSTOM_FIELDS';
6
-
7
- const fetchCustomFieldsRequest = () => ({
8
- type: FETCH_CUSTOM_FIELDS_REQUEST,
9
- });
10
-
11
- const fetchCustomFieldsSuccess = (fields: any[]) => ({
12
- type: SET_CUSTOM_FIELDS,
13
- payload: fields,
14
- });
15
-
16
- export const fetchCustomFields = () => {
17
- return async (dispatch: AppDispatch) => {
18
- dispatch(fetchCustomFieldsRequest());
19
-
20
- try {
21
- const response = await get('custom-fields');
22
- // @ts-ignore
23
- dispatch(fetchCustomFieldsSuccess(response?.data));
24
- } catch (error: any) {
25
- console.error('Failed to fetch custom fields:', error);
26
- }
27
- };
28
- };
@@ -1,16 +0,0 @@
1
- import { AppDispatch } from "../store";
2
- import { SET_SUCCESS_SNACKBAR, SET_ERROR_SNACKBAR, CLEAR_SNACKBAR } from "./action-types"
3
-
4
- const success = (message: string, heading: string = '') => (dispatch: AppDispatch) => {
5
- dispatch({ type: SET_SUCCESS_SNACKBAR, payload: { message, heading } });
6
- }
7
-
8
- const failure = (message: string, heading: string = '') => (dispatch: AppDispatch) => {
9
- dispatch({ type: SET_ERROR_SNACKBAR, payload: { message, heading } });
10
- }
11
-
12
- const closeSnackbar = () => (dispatch: AppDispatch) => {
13
- dispatch({ type: CLEAR_SNACKBAR });
14
- }
15
-
16
- export { success, failure, closeSnackbar }