From f106371fcaee8e2b2634750fc18dfaa9ad3dd8ba Mon Sep 17 00:00:00 2001 From: cha0s Date: Wed, 16 Oct 2019 01:09:58 -0500 Subject: [PATCH] refactor: selfEntity --- client/ui/menu/index.js | 2 +- client/ui/menu/quick-status.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/ui/menu/index.js b/client/ui/menu/index.js index 0280b5d..6f9dc55 100644 --- a/client/ui/menu/index.js +++ b/client/ui/menu/index.js @@ -28,7 +28,7 @@ const MenuComponent = ({app}) => { opened ? 'open' : '', )}> - + diff --git a/client/ui/menu/quick-status.js b/client/ui/menu/quick-status.js index e2fbbf8..758f684 100644 --- a/client/ui/menu/quick-status.js +++ b/client/ui/menu/quick-status.js @@ -11,8 +11,7 @@ const decorate = compose( contempo(require('./quick-status.raw.scss').default), ); -const QuickStatusComponent = ({app}) => { - const selfEntity = usePropertyChange(app, 'selfEntity'); +const QuickStatusComponent = ({selfEntity}) => { const life = usePropertyChange(selfEntity, 'life', 0); const maxLife = usePropertyChange(selfEntity, 'maxLife', 0); const width = life / maxLife;