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 Component from 'inferno-component';
export const GeneralDisplay = ({
partsOfSpeech,

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,11 @@ import Inferno from 'inferno';
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)
to fit React/Inferno and Lexiconga