source: jobvista-frontend/src/utils/toastUtils.js

main
Last change on this file was 08f82ec, checked in by 223021 <daniel.ilievski.2@…>, 13 days ago

Did more refactoring

  • Property mode set to 100644
File size: 4.5 KB
Line 
1import { toast } from 'react-toastify';
2import 'react-toastify/dist/ReactToastify.css';
3
4
5export const notifyProfileEdit = () => {
6 toast.success(
7 <span>
8 Your details were successfully updated!
9 </span>, {
10 position: "bottom-right",
11 autoClose: 5000,
12 hideProgressBar: false,
13 closeOnClick: true,
14 pauseOnHover: false,
15 draggable: true,
16 progress: undefined,
17 theme: "dark",
18 pauseOnFocusLoss: false
19 });
20}
21
22export const notifyProfilePicChange = () => {
23 toast.success(
24 <span>
25 Your profile picture was successfully changed!
26 </span>, {
27 position: "bottom-right",
28 autoClose: 5000,
29 hideProgressBar: false,
30 closeOnClick: true,
31 pauseOnHover: false,
32 draggable: true,
33 progress: undefined,
34 theme: "dark",
35 pauseOnFocusLoss: false
36 });
37}
38
39export const notifyLogoChange = () => {
40 toast.success(
41 <span>
42 Your logo was successfully changed!
43 </span>, {
44 position: "bottom-right",
45 autoClose: 5000,
46 hideProgressBar: false,
47 closeOnClick: true,
48 pauseOnHover: false,
49 draggable: true,
50 progress: undefined,
51 theme: "dark",
52 pauseOnFocusLoss: false
53 });
54}
55
56export const notifyJobAdEdit = () => {
57 toast.success(
58 <span>
59 Job advertisement updated successfully!
60 </span>, {
61 position: "bottom-right",
62 autoClose: 5000,
63 hideProgressBar: false,
64 closeOnClick: true,
65 pauseOnHover: false,
66 draggable: true,
67 progress: undefined,
68 theme: "dark",
69 pauseOnFocusLoss: false
70 });
71}
72
73export const notifyJobAdPost = () => {
74 toast.success(
75 <span>
76 Job advertisement posted successfully!
77 </span>, {
78 position: "bottom-right",
79 autoClose: 5000,
80 hideProgressBar: false,
81 closeOnClick: true,
82 pauseOnHover: false,
83 draggable: true,
84 progress: undefined,
85 theme: "dark",
86 pauseOnFocusLoss: false
87 });
88}
89
90export const notifyJobAdDelete = () => {
91 toast.success(
92 <span>
93 Job advertisement deleted successfully!
94 </span>, {
95 position: "bottom-right",
96 autoClose: 5000,
97 hideProgressBar: false,
98 closeOnClick: true,
99 pauseOnHover: false,
100 draggable: true,
101 progress: undefined,
102 theme: "dark",
103 pauseOnFocusLoss: false
104 });
105}
106
107export const notifyAppStatusUpdate = () => {
108 toast.success(
109 <span>
110 Status updated successfully!
111 </span>, {
112 position: "bottom-right",
113 autoClose: 5000,
114 hideProgressBar: false,
115 closeOnClick: true,
116 pauseOnHover: false,
117 draggable: true,
118 progress: undefined,
119 theme: "dark",
120 pauseOnFocusLoss: false
121 });
122}
123
124export const notifyJobAdApply = () => {
125 toast.success(
126 <span>
127 Your application was successfully sent!
128 </span>, {
129 position: "bottom-right",
130 autoClose: 5000,
131 hideProgressBar: false,
132 closeOnClick: true,
133 pauseOnHover: false,
134 draggable: true,
135 progress: undefined,
136 theme: "dark",
137 pauseOnFocusLoss: false
138 });
139}
140
141export const notifyAccessUpdate = (companyName) => {
142 toast.success(
143 <span>
144 {companyName}'s access was successfully changed!
145 </span>, {
146 position: "bottom-right",
147 autoClose: 5000,
148 hideProgressBar: false,
149 closeOnClick: true,
150 pauseOnHover: false,
151 draggable: true,
152 progress: undefined,
153 theme: "dark",
154 pauseOnFocusLoss: false
155 });
156}
157
158export const notifyIncorrectEmailOrPassword = () => {
159 toast.error(
160 <span>Incorrect email or password. Please try again.</span>,
161 {
162 position: "bottom-right",
163 autoClose: 5000,
164 hideProgressBar: false,
165 closeOnClick: true,
166 pauseOnHover: false,
167 draggable: true,
168 progress: undefined,
169 theme: "dark",
170 pauseOnFocusLoss: false
171 }
172 );
173}
Note: See TracBrowser for help on using the repository browser.