We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e69e508 commit 9b1818eCopy full SHA for 9b1818e
src/utils/fileContents.js
@@ -5,15 +5,16 @@ const fileContents = (
5
postIdStr,
6
postType,
7
postAuthor
8
-) => `{
9
- "postId": "${postIdStr}",
10
- "titleContent": "${postTitle}",
11
- "textContent": ${postText},
12
- "imageSource": "${postImage}",
13
- "createdAt": ${Date.now()},
14
- "postType": "${postType}",
15
- "postAuthor": "${postAuthor}"
16
-}`;
+) =>
+ JSON.stringify({
+ postId: postIdStr,
+ titleContent: postTitle,
+ textContent: postText,
+ imageSource: postImage,
+ createdAt: Date.now(),
+ postType: postType,
+ postAuthor: postAuthor
17
+ });
18
19
export default fileContents;
20
0 commit comments