|
@ -2,19 +2,19 @@ import React, { |
|
|
useCallback, useEffect, useState, |
|
|
useCallback, useEffect, useState, |
|
|
} from 'react'; |
|
|
} from 'react'; |
|
|
import { |
|
|
import { |
|
|
Button, Container, Form, Icon, Input, TextArea, |
|
|
Button, Container, Form, Header, Icon, Input, TextArea, |
|
|
} from 'semantic-ui-react'; |
|
|
} from 'semantic-ui-react'; |
|
|
import { useTranslation } from 'react-i18next'; |
|
|
import { useTranslation } from 'react-i18next'; |
|
|
import { useHistory } from 'react-router'; |
|
|
import { useHistory } from 'react-router'; |
|
|
import { useSelector } from 'react-redux'; |
|
|
import { useSelector } from 'react-redux'; |
|
|
import { drizzle, breeze } from '../../../redux/store'; |
|
|
import { drizzle, breeze } from '../../../redux/store'; |
|
|
import './styles.css'; |
|
|
|
|
|
import { TRANSACTION_ERROR, TRANSACTION_SUCCESS } from '../../../constants/TransactionStatus'; |
|
|
import { TRANSACTION_ERROR, TRANSACTION_SUCCESS } from '../../../constants/TransactionStatus'; |
|
|
import { POSTS_DATABASE, TOPICS_DATABASE } from '../../../constants/orbit/OrbitDatabases'; |
|
|
import { POSTS_DATABASE, TOPICS_DATABASE } from '../../../constants/orbit/OrbitDatabases'; |
|
|
import { TOPIC_SUBJECT } from '../../../constants/orbit/TopicsDatabaseKeys'; |
|
|
import { TOPIC_SUBJECT } from '../../../constants/orbit/TopicsDatabaseKeys'; |
|
|
import { POST_CONTENT } from '../../../constants/orbit/PostsDatabaseKeys'; |
|
|
import { POST_CONTENT } from '../../../constants/orbit/PostsDatabaseKeys'; |
|
|
import { FORUM_CONTRACT } from '../../../constants/contracts/ContractNames'; |
|
|
import { FORUM_CONTRACT } from '../../../constants/contracts/ContractNames'; |
|
|
import { TOPIC_CREATED_EVENT } from '../../../constants/contracts/events/ForumContractEvents'; |
|
|
import { TOPIC_CREATED_EVENT } from '../../../constants/contracts/events/ForumContractEvents'; |
|
|
|
|
|
import './styles.css'; |
|
|
|
|
|
|
|
|
const { contracts: { [FORUM_CONTRACT]: { methods: { createTopic } } } } = drizzle; |
|
|
const { contracts: { [FORUM_CONTRACT]: { methods: { createTopic } } } } = drizzle; |
|
|
const { orbit: { stores } } = breeze; |
|
|
const { orbit: { stores } } = breeze; |
|
@ -97,6 +97,7 @@ const TopicCreate = (props) => { |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<Container> |
|
|
<Container> |
|
|
|
|
|
<Header id="new-topic-header">New Topic</Header> |
|
|
<Form loading={posting}> |
|
|
<Form loading={posting}> |
|
|
<Form.Field required> |
|
|
<Form.Field required> |
|
|
<label htmlFor="form-topic-create-field-subject"> |
|
|
<label htmlFor="form-topic-create-field-subject"> |
|
|