diff --git a/client/src/components/instance.component.jsx b/client/src/components/instance.component.jsx
index 76291079..d4953550 100644
--- a/client/src/components/instance.component.jsx
+++ b/client/src/components/instance.component.jsx
@@ -7,7 +7,6 @@ const Hammer = require('hammerjs');
const Vbox = require('./vbox.component');
const InfoContainer = require('./info.container');
const InstanceConstructsContainer = require('./instance.constructs');
-// const EquipmentContainer = require('./instance.equip');
const Faceoff = require('./faceoff');
const actions = require('../actions');
@@ -53,6 +52,11 @@ const addState = connect(
);
class Instance extends Component {
+ componentShouldUpdate(newProps) {
+ if (newProps.instance !== this.props.instance) return true;
+ return false;
+ }
+
render(args) {
const {
instance,
diff --git a/client/src/components/instance.equip.jsx b/client/src/components/instance.equip.jsx
deleted file mode 100644
index ef4ac2e3..00000000
--- a/client/src/components/instance.equip.jsx
+++ /dev/null
@@ -1,144 +0,0 @@
-const { connect } = require('preact-redux');
-const preact = require('preact');
-const range = require('lodash/range');
-
-const actions = require('../actions');
-const shapes = require('./shapes');
-const { convertItem } = require('./../utils');
-
-const addState = connect(
- function receiveState(state) {
- const { account, activeConstruct, itemInfo, info, ws, instance, player, itemUnequip } = state;
-
- function sendUnequip(constructId, item) {
- return ws.sendVboxUnequip(instance.id, constructId, item);
- }
-
- return { player, itemInfo, instance, info, sendUnequip, activeConstruct, itemUnequip };
- },
-
- function receiveDispatch(dispatch) {
- function setInfo(item) {
- dispatch(actions.setInfo(item));
- }
-
- function clearInfo() {
- return dispatch(actions.setInfo(null));
- }
-
- function setItemEquip(v) {
- return dispatch(actions.setItemEquip(v));
- }
-
- function setItemUnequip(v) {
- return dispatch(actions.setItemUnequip(v));
- }
-
- return { setInfo, setItemEquip, setItemUnequip, clearInfo };
- }
-
-);
-
-function Equipment(props) {
- const {
- player,
- instance,
-
- itemUnequip,
- setItemEquip,
- setItemUnequip,
- activeConstruct,
-
- itemInfo,
- sendUnequip,
-
- setInfo,
- } = props;
-
- if (instance.phase === 'Lobby') return false;
-
- const { vbox } = player;
-
- const fullInfo = itemInfo.items.find(i => i.item === itemUnequip);
- const isSkill = fullInfo && fullInfo.skill;
- const isSpec = fullInfo && fullInfo.spec;
-
- function skillClick(e, i) {
- if (itemUnequip && activeConstruct) return false;
- // const value = vbox.bound[i];
- setItemEquip(i);
- return false;
- }
-
- function unequipClick(e) {
- e.stopPropagation();
- if (!itemUnequip) return false;
- if (!activeConstruct) return false;
- setItemUnequip([]);
- return sendUnequip(activeConstruct.id, itemUnequip);
- }
-
- function hoverInfo(e, info) {
- e.stopPropagation();
- return setInfo(info);
- }
-
- const skillClass = isSkill ? 'skills highlight' : 'skills';
- const specClass = isSpec ? 'specs highlight' : 'specs';
-
- const skills = range(0, 9).map(i => {
- const item = convertItem(vbox.bound[i]);
- const skillInfo = itemInfo.items.find(i => i.item === item);
- if (skillInfo && skillInfo.skill) {
- return (
-
- );
- }
- return false;
- });
-
- const specs = range(0, 9).map(i => {
- const item = convertItem(vbox.bound[i]);
- const specInfo = itemInfo.items.find(i => i.item === item);
- if (specInfo && specInfo.spec) {
- return (
-