Some codestyle fixes

This commit is contained in:
Luka Murn 2017-09-28 19:49:25 +02:00
parent 6951755a92
commit a0db8fcf9d
3 changed files with 20 additions and 20 deletions

View file

@ -49,20 +49,23 @@ class Alert extends Component {
`glyphicon
${Alert.glyphiconClass(this.props.type)}`;
return(
return (
<Wrapper className={alertClassName}>
<Grid><Row><Col>
<button type="button"
className="close"
data-dismiss="alert"
aria-label="Close"
onClick={this.props.onClose}
>
<span aria-hidden="true">×</span>
</button>
<span className={glyphiconClassName} />
<span>&nbsp;{this.props.message}</span>
</Col></Row></Grid>
<Grid>
<Row>
<Col>
<button type="button"
className="close"
data-dismiss="alert"
aria-label="Close"
onClick={this.props.onClose}>
<span aria-hidden="true">×</span>
</button>
<span className={glyphiconClassName} />
<span>&nbsp;{this.props.message}</span>
</Col>
</Row>
</Grid>
</Wrapper>
);
}

View file

@ -21,6 +21,7 @@ class AlertsContainer extends Component {
this.add = this.add.bind(this);
this.clearAll = this.clearAll.bind(this);
this.clear = this.clear.bind(this);
this.renderAlert = this.renderAlert.bind(this);
// Bind self to global namespace
@ -31,9 +32,7 @@ class AlertsContainer extends Component {
this.setState(
update(
this.state,
{
alerts: { $push: [{ message, type, timeout }] }
}
{ alerts: { $push: [{ message, type, timeout }] } }
)
);
}
@ -65,8 +64,7 @@ class AlertsContainer extends Component {
{this.state.alerts.map((alert, index) =>
<CSSTransition key={`alert-${index}`}
timeout={500}
classNames="alert-animated"
>
classNames="alert-animated">
{this.renderAlert(alert, index)}
</CSSTransition>
)}

View file

@ -24,8 +24,7 @@ const ContentWrapper = styled.div`
const ScinoteApp = () =>
<Provider store={store}>
<IntlProvider locale={locale}
messages={flattenMessages(messages[locale])}
>
messages={flattenMessages(messages[locale])}>
<div>
<BrowserRouter>
<div>