|
@ -2,7 +2,7 @@ import React, { |
|
|
useCallback, useEffect, useState, |
|
|
useCallback, useEffect, useState, |
|
|
} from 'react'; |
|
|
} from 'react'; |
|
|
import { |
|
|
import { |
|
|
Button, Container, Form, Header, 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'; |
|
@ -97,7 +97,7 @@ const TopicCreate = (props) => { |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<Container> |
|
|
<Container> |
|
|
<Header id="new-topic-header">New Topic</Header> |
|
|
<Header id="new-topic-header" as="h2">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"> |
|
@ -126,23 +126,23 @@ const TopicCreate = (props) => { |
|
|
onChange={handleSubjectInputChange} |
|
|
onChange={handleSubjectInputChange} |
|
|
/> |
|
|
/> |
|
|
</Form.Field> |
|
|
</Form.Field> |
|
|
<Form.Group> |
|
|
<Button |
|
|
<Form.Button |
|
|
id="create-topic-button" |
|
|
animated |
|
|
animated |
|
|
key="form-topic-create-button-submit" |
|
|
key="form-topic-create-button-submit" |
|
|
type="button" |
|
|
type="button" |
|
|
color="green" |
|
|
className="primary-button" |
|
|
disabled={posting || subjectInput === '' || contentInput === ''} |
|
|
disabled={posting || subjectInput === '' || contentInput === ''} |
|
|
onClick={validateAndPost} |
|
|
onClick={validateAndPost} |
|
|
> |
|
|
> |
|
|
<Button.Content visible> |
|
|
<Button.Content visible> |
|
|
{t('topic.create.form.post.button')} |
|
|
{t('topic.create.form.post.button')} |
|
|
</Button.Content> |
|
|
</Button.Content> |
|
|
<Button.Content hidden> |
|
|
<Button.Content hidden> |
|
|
<Icon name="send" /> |
|
|
<Icon name="send" /> |
|
|
</Button.Content> |
|
|
</Button.Content> |
|
|
</Form.Button> |
|
|
</Button> |
|
|
</Form.Group> |
|
|
|
|
|
</Form> |
|
|
</Form> |
|
|
</Container> |
|
|
</Container> |
|
|
); |
|
|
); |
|
|