+
);
diff --git a/src/store/actions/tutorialPageActions.js b/src/store/actions/tutorialPageActions.js
index c716765a..d12dea25 100644
--- a/src/store/actions/tutorialPageActions.js
+++ b/src/store/actions/tutorialPageActions.js
@@ -119,8 +119,7 @@ export const getTutorialData =
.collection("tutorials")
.doc(tutorialID)
.get();
- const tutorial = data.data();
- dispatch({ type: actions.GET_POST_DATA_SUCCESS, payload: tutorial });
+ const tutorial = { tutorial_id: tutorialID, ...data.data() }; dispatch({ type: actions.GET_POST_DATA_SUCCESS, payload: tutorial });
} catch (e) {
dispatch({ type: actions.GET_POST_DATA_FAIL });
console.log(e);
diff --git a/src/store/actions/tutorialsActions.js b/src/store/actions/tutorialsActions.js
index 7d273c1d..52953242 100644
--- a/src/store/actions/tutorialsActions.js
+++ b/src/store/actions/tutorialsActions.js
@@ -144,7 +144,10 @@ export const createTutorial =
background_color: "#ffffff",
text_color: "#000000",
createdAt: firestore.FieldValue.serverTimestamp(),
- updatedAt: firestore.FieldValue.serverTimestamp()
+ updatedAt: firestore.FieldValue.serverTimestamp(),
+ likes: 0,
+ dislikes: 0,
+ views: 0,
});
// Adds first step when a tutorial is created