mirror of
https://github.com/gosticks/web.git
synced 2026-12-03 17:51:39 +00:00
Internationalize StatusBadge and fix a missed spot in Sidebar
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -91,7 +91,9 @@ const navItem = (item, key, props) => (
|
||||
|
||||
const navDropdown = (item, key, props) => (
|
||||
<li key={key} className={activeRoute(item.url, props)}>
|
||||
<a className="nav-link nav-dropdown-toggle" style={{ "cursor": "pointer" }} onClick={handleClick}><i className={item.icon}/>{item.name}</a>
|
||||
<a className="nav-link nav-dropdown-toggle" style={{ "cursor": "pointer" }} onClick={handleClick}>
|
||||
<i className={item.icon}/>{props.t(item.name)}
|
||||
</a>
|
||||
<ul className="nav-dropdown-items">
|
||||
{navList(item.children, props)}
|
||||
</ul>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React, { Component } from 'react';
|
||||
import { translate } from 'react-i18next';
|
||||
import { api, makeCancelable, ignoreCancel } from '../utils';
|
||||
|
||||
export default class StatusBadge extends Component {
|
||||
class StatusBadge extends Component {
|
||||
state = {
|
||||
status: "enabled"
|
||||
};
|
||||
@@ -23,12 +24,16 @@ export default class StatusBadge extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
|
||||
return (
|
||||
this.state.status === "enabled"
|
||||
?
|
||||
<span><i className="fa fa-circle text-success"/> Enabled</span>
|
||||
<span><i className="fa fa-circle text-success"/> {t("Enabled")}</span>
|
||||
:
|
||||
<span><i className="fa fa-circle text-danger"/> Disabled</span>
|
||||
<span><i className="fa fa-circle text-danger"/> {t("Disabled")}</span>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default translate("common")(StatusBadge);
|
||||
Reference in New Issue
Block a user