diff --git a/packages/concordia-app/package.json b/packages/concordia-app/package.json index f233e96..6b597ea 100644 --- a/packages/concordia-app/package.json +++ b/packages/concordia-app/package.json @@ -45,6 +45,7 @@ "react-router-dom": "^5.2.0", "react-scripts": "~3.4.3", "redux-saga": "~1.1.3", + "react-timeago": "~5.2.0", "semantic-ui-css": "~2.4.1", "semantic-ui-react": "~1.2.1", "web3": "1.3.0" diff --git a/packages/concordia-app/public/locales/en/translation.json b/packages/concordia-app/public/locales/en/translation.json index a6cb0b5..809fb50 100644 --- a/packages/concordia-app/public/locales/en/translation.json +++ b/packages/concordia-app/public/locales/en/translation.json @@ -6,7 +6,6 @@ "post.create.form.send.button": "Post", "post.form.content.field.placeholder": "Message", "post.form.subject.field.placeholder": "Subject", - "post.list.row.author.pre": "Post by", "post.list.row.post.id": "#{{id}}", "profile.general.tab.address.row.title": "Account address:", "profile.general.tab.location.row.title": "Location:", @@ -52,7 +51,7 @@ "topic.create.form.post.button": "Post", "topic.create.form.subject.field.label": "Topic subject", "topic.create.form.subject.field.placeholder": "Subject", - "topic.list.row.author.date": "Created by {{author}}, {{timeAgo}}", + "topic.list.row.author": "by {{author}}", "topic.list.row.number.of.replies": "{{numberOfReplies}} replies", "topic.list.row.topic.id": "#{{id}}" -} \ No newline at end of file +} diff --git a/packages/concordia-app/src/components/PostCreate/index.jsx b/packages/concordia-app/src/components/PostCreate/index.jsx index 0bbabf7..bb87205 100644 --- a/packages/concordia-app/src/components/PostCreate/index.jsx +++ b/packages/concordia-app/src/components/PostCreate/index.jsx @@ -14,7 +14,7 @@ import { USER_PROFILE_PICTURE } from '../../constants/orbit/UserDatabaseKeys'; import { breeze, drizzle } from '../../redux/store'; import './styles.css'; import { TRANSACTION_ERROR, TRANSACTION_SUCCESS } from '../../constants/TransactionStatus'; -import { POST_CONTENT, POST_SUBJECT } from '../../constants/orbit/PostsDatabaseKeys'; +import { POST_CONTENT } from '../../constants/orbit/PostsDatabaseKeys'; import { FORUM_CONTRACT } from '../../constants/contracts/ContractNames'; import { POST_CREATED_EVENT } from '../../constants/contracts/events/ForumContractEvents'; @@ -27,7 +27,7 @@ const PostCreate = (props) => { } = props; const transactionStack = useSelector((state) => state.transactionStack); const transactions = useSelector((state) => state.transactions); - const [postSubject, setPostSubject] = useState(initialPostSubject); + const [postSubject] = useState(initialPostSubject); const [postContent, setPostContent] = useState(''); const [userProfilePictureUrl, setUserProfilePictureUrl] = useState(); const [createPostCacheSendStackId, setCreatePostCacheSendStackId] = useState(''); @@ -68,9 +68,6 @@ const PostCreate = (props) => { } switch (event.target.name) { - case 'postSubject': - setPostSubject(event.target.value); - break; case 'postContent': setPostContent(event.target.value); break; @@ -94,11 +91,9 @@ const PostCreate = (props) => { postsDb .put(contractPostId, { - [POST_SUBJECT]: postSubject, [POST_CONTENT]: postContent, }, { pin: true }) .then(() => { - setPostSubject(initialPostSubject); setPostContent(''); setPosting(false); setStoringPost(false); @@ -147,21 +142,6 @@ const PostCreate = (props) => { -
- - - {t('post.list.row.post.id', { id: postIndexInTopic })} - -
-
-