diff --git a/src/redux/actions/blog.js b/src/redux/actions/blog.js index 0301cbe..0cd3123 100644 --- a/src/redux/actions/blog.js +++ b/src/redux/actions/blog.js @@ -8,6 +8,8 @@ const blog = { await proxy.get("public/blogInfo", data, { dispatch }), active: (data) => async (dispatch) => await dispatch({ type: "public/active", data }), + letterAdd: (data) => async (dispatch) => + await proxy.post("news/LetterAdd", data, { dispatch }), }; export default blog; diff --git a/src/redux/reducers/blog.js b/src/redux/reducers/blog.js index b96dde6..56e0b3c 100644 --- a/src/redux/reducers/blog.js +++ b/src/redux/reducers/blog.js @@ -5,36 +5,7 @@ const initialState = { error: null, list: [], info: null, - hashtags: [ - { - title: "فناوری اطلاعات", - color: "#019BC3", - }, - { - title: "سخت افزار", - color: "#7CC301", - }, - { - title: "آموزشی", - color: "#C5B90C", - }, - { - title: "فرهنگی", - color: "#C2684D", - }, - { - title: "معرفی کتاب", - color: "#8B4DC2", - }, - { - title: "مهارت آموزی", - color: "#780D6D", - }, - { - title: "پیشرفت شخصی", - color: "#E63F15", - }, - ], + hashtags : [], active: null, }; export default function blog(state = initialState, action) { @@ -57,6 +28,9 @@ export default function blog(state = initialState, action) { }; case "public/blogInfo": return { ...state, loading: false, error: null, blog: data }; + case "news/LetterAdd": + toast.success('.به خبرنامه دانوین خوش آمدید'); + return { ...state, loading: false, error: null }; case "blog/loading": return { ...state, loading: true }; case "blog/error": diff --git a/src/views/Blogs/layouts/Hashtags.js b/src/views/Blogs/layouts/Hashtags.js index c74052a..50ff0af 100644 --- a/src/views/Blogs/layouts/Hashtags.js +++ b/src/views/Blogs/layouts/Hashtags.js @@ -10,8 +10,8 @@ export const Hashtags = ({ hashtags }) => {
+
بهترین و آخرین اخبار علمی و آموزشی را در ایمیل خودتون دریافت کنید. هر زمان هم که لازم نداشتید می تونید عضویت رو لغو کنید