diff --git a/apps/comments-ui/src/components/AddForm.js b/apps/comments-ui/src/components/AddForm.js index 286d8bb789..8aacd9ae09 100644 --- a/apps/comments-ui/src/components/AddForm.js +++ b/apps/comments-ui/src/components/AddForm.js @@ -1,6 +1,5 @@ -// import React, {useState} from 'react'; -import {Transition} from '@headlessui/react'; import React, {useContext, useState} from 'react'; +import {Transition} from '@headlessui/react'; import AppContext from '../AppContext'; import Avatar from './Avatar'; @@ -18,7 +17,6 @@ const AddForm = (props) => { event.preventDefault(); if (message.length === 0) { - // alert('Please enter a message'); TODO: Check, but don't think we really need this return; } diff --git a/apps/comments-ui/src/components/Comment.js b/apps/comments-ui/src/components/Comment.js index 46cd5f6de5..baf4f2794b 100644 --- a/apps/comments-ui/src/components/Comment.js +++ b/apps/comments-ui/src/components/Comment.js @@ -1,5 +1,5 @@ -import {formatRelativeTime} from '../utils/helpers'; import React, {useContext, useState} from 'react'; +import {Transition} from '@headlessui/react'; import Avatar from './Avatar'; import Like from './Like'; import Reply from './Reply'; @@ -8,6 +8,7 @@ import EditForm from './EditForm'; import Replies from './Replies'; import ReplyForm from './ReplyForm'; import AppContext from '../AppContext'; +import {formatRelativeTime} from '../utils/helpers'; const Comment = (props) => { const [isInEditMode, setIsInEditMode] = useState(false); @@ -63,11 +64,19 @@ const Comment = (props) => { - {isInReplyMode && -