diff --git a/api/functions/sign-event/sign-event.js b/api/functions/sign-event/sign-event.js index e8be0f8..bd9ab60 100644 --- a/api/functions/sign-event/sign-event.js +++ b/api/functions/sign-event/sign-event.js @@ -9,7 +9,6 @@ const { prisma } = require('../../prisma'); const signEvent = async (req, res) => { - console.log(req.body); try { const userPubKey = await extractKeyFromCookie(req.headers.cookie ?? req.headers.Cookie) const user = await getUserByPubKey(userPubKey); @@ -40,13 +39,11 @@ const signEvent = async (req, res) => { pubkey, content, tags, - created_at: Date.now(), + created_at: Math.round(Date.now() / 1000), } event.sig = await signNostrEvent(event, prvkey); - console.log(event); - return res .status(200) .json({ event }); diff --git a/src/features/Posts/Components/Comments/AddComment/AddComment.tsx b/src/features/Posts/Components/Comments/AddComment/AddComment.tsx index cd2090d..f2046e1 100644 --- a/src/features/Posts/Components/Comments/AddComment/AddComment.tsx +++ b/src/features/Posts/Components/Comments/AddComment/AddComment.tsx @@ -87,7 +87,7 @@ export default function AddComment({ initialContent, placeholder, name, autoFocu const submitComment = () => { onSubmit?.(valueRef.current); - // manager.view.updateState(manager.createState({ content: manager.createEmptyDoc() })) + manager.view.updateState(manager.createState({ content: manager.createEmptyDoc() })) } diff --git a/src/features/Posts/Components/Comments/CommentCard/CommentCard.tsx b/src/features/Posts/Components/Comments/CommentCard/CommentCard.tsx index cc7813d..4c26ed6 100644 --- a/src/features/Posts/Components/Comments/CommentCard/CommentCard.tsx +++ b/src/features/Posts/Components/Comments/CommentCard/CommentCard.tsx @@ -1,3 +1,4 @@ +import { marked } from "marked"; import { BiComment } from "react-icons/bi"; import VotesCount from "src/Components/VotesCount/VotesCount"; import Header from "src/features/Posts/Components/PostCard/Header/Header"; @@ -13,8 +14,8 @@ export default function CommentCard({ comment, onReply }: Props) { return (
- {comment.body} +
+