mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-04 12:14:37 +08:00
Some codestyle fixes
This commit is contained in:
parent
6951755a92
commit
a0db8fcf9d
3 changed files with 20 additions and 20 deletions
|
@ -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> {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> {this.props.message}</span>
|
||||
</Col>
|
||||
</Row>
|
||||
</Grid>
|
||||
</Wrapper>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
)}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue