From ec836ae63cd1521642ce20609c4652846ab4f570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Wed, 30 Oct 2019 13:38:07 +0000 Subject: [PATCH] chore(ui): avoid using inject in StaticLabel --- ui/src/Components/Labels/StaticLabel/index.js | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/ui/src/Components/Labels/StaticLabel/index.js b/ui/src/Components/Labels/StaticLabel/index.js index 91f9a6bd4..76ee9aab4 100644 --- a/ui/src/Components/Labels/StaticLabel/index.js +++ b/ui/src/Components/Labels/StaticLabel/index.js @@ -1,27 +1,25 @@ import React from "react"; -import { inject, observer } from "mobx-react"; +import { observer } from "mobx-react"; import { BaseLabel } from "Components/Labels/BaseLabel"; // Renders a static label element, no click actions, no hover -const StaticLabel = inject("alertStore")( - observer( - class FilteringLabel extends BaseLabel { - render() { - const { name, value } = this.props; +const StaticLabel = observer( + class FilteringLabel extends BaseLabel { + render() { + const { name, value } = this.props; - let cs = this.getClassAndStyle(name, value); + let cs = this.getClassAndStyle(name, value); - return ( - - {name}:{" "} - {value} - - ); - } + return ( + + {name}:{" "} + {value} + + ); } - ) + } ); export { StaticLabel };