Minor cleanup

This commit is contained in:
Robbie Antenesse 2017-08-21 15:12:46 -06:00 committed by Robbie Antenesse
parent edbe5cbcb0
commit ec19dfc583
6 changed files with 37 additions and 24 deletions

View File

@ -1,5 +1,4 @@
import Inferno from 'inferno'; import Inferno from 'inferno';
import Component from 'inferno-component';
export const GeneralDisplay = ({ export const GeneralDisplay = ({
partsOfSpeech, partsOfSpeech,

View File

@ -1,5 +1,4 @@
import Inferno from 'inferno'; import Inferno from 'inferno';
import Component from 'inferno-component';
import marked from 'marked'; import marked from 'marked';
import sanitizeHtml from 'sanitize-html'; import sanitizeHtml from 'sanitize-html';

View File

@ -28,35 +28,48 @@ export class WordDisplay extends Component {
<section className='card-content'> <section className='card-content'>
<div className='content'> <div className='content'>
{(this.props.word.pronunciation || this.props.word.partOfSpeech) {
&& (<p> (this.props.word.pronunciation || this.props.word.partOfSpeech)
{(this.props.word.partOfSpeech) && (
? (<small>{ this.props.word.partOfSpeech }</small>) <p>
: ''} {
(this.props.word.partOfSpeech)
? (<small>{ this.props.word.partOfSpeech }</small>)
: ''
}
{(this.props.word.partOfSpeech && this.props.word.pronunciation) {
? ' | ' (this.props.word.partOfSpeech && this.props.word.pronunciation)
: ''} ? ' | '
: ''
}
{(this.props.word.pronunciation) {
? (<small>{ this.props.word.pronunciation }</small>) (this.props.word.pronunciation)
: ''} ? (<small>{ this.props.word.pronunciation }</small>)
</p> : ''
)} }
</p>
)
}
{(this.props.word.definition) {
(this.props.word.definition)
&& ( && (
<p> <p>
{ this.props.word.definition } { this.props.word.definition }
</p> </p>
)} )
}
{(this.props.word.details) {
(this.props.word.details)
&& ( && (
<p> <p>
{ this.props.word.details } { this.props.word.details }
</p> </p>
)} )
}
</div> </div>
</section> </section>

View File

@ -1,5 +1,4 @@
import Inferno from 'inferno'; import Inferno from 'inferno';
import Component from 'inferno-component';
export const EditDictionaryForm = ({ export const EditDictionaryForm = ({
editDictionaryModal, editDictionaryModal,

View File

@ -1,5 +1,4 @@
import Inferno from 'inferno'; import Inferno from 'inferno';
import Component from 'inferno-component';
import { IPAField } from '../IPAField'; import { IPAField } from '../IPAField';

View File

@ -2,7 +2,11 @@ import Inferno from 'inferno';
import {IPAField} from './IPAField'; import {IPAField} from './IPAField';
export const IPATable = ({ value, close, update }) => { export const IPATable = ({
value,
close,
update
}) => {
/* /*
Modified from KeyboardFire's Phondue project (https://github.com/KeyboardFire/phondue) Modified from KeyboardFire's Phondue project (https://github.com/KeyboardFire/phondue)
to fit React/Inferno and Lexiconga to fit React/Inferno and Lexiconga