Skip to content

Commit

Permalink
node to total active
Browse files Browse the repository at this point in the history
  • Loading branch information
apackin authored Jul 8, 2019
1 parent 94ed756 commit c1c4e22
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/Filters/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { nodeColors } from "../../utils";

// This should be defined elsewhere
const labels = ["active", "supernode", "hub", "potential", "linkNYC"];
const displayLabels = { active: "node" };
const displayLabels = { active: "Total Active" };

export default class Filters extends PureComponent {
componentDidMount() {
Expand All @@ -31,8 +31,7 @@ export default class Filters extends PureComponent {
const { filters, statusCounts, toggleFilter } = this.props;
const enabled = filters[label] || filters[label] === undefined;
const opacity = enabled ? "o-100" : "o-50 strike";
const sanitizedLabel = label.replace("-", " ");
const labelName = displayLabels[sanitizedLabel] || sanitizedLabel;
const labelDisplay = displayLabels[label] || label;
return (
<div
key={label}
Expand All @@ -56,7 +55,7 @@ export default class Filters extends PureComponent {
{icons[label]}
</div>
<span className="ml1">
{labelName} ({statusCounts[label] || 0})
{labelDisplay} ({statusCounts[label] || 0})
</span>
</label>
<input
Expand Down

0 comments on commit c1c4e22

Please sign in to comment.