);
}
diff --git a/client/src/components/vbox.info.jsx b/client/src/components/vbox.info.jsx
index 26f0a975..dac8e2e2 100644
--- a/client/src/components/vbox.info.jsx
+++ b/client/src/components/vbox.info.jsx
@@ -1,70 +1,55 @@
const preact = require('preact');
-const { connect } = require('preact-redux');
const { tutorialStage } = require('../tutorial.utils');
const { genItemInfo } = require('./vbox.utils');
-const addState = connect(({ info, player, tutorial, vboxInfo, ws, itemInfo, instance }) =>
- ({ info, player, tutorial, vboxInfo, ws, itemInfo, instance }));
+function Info(props) {
+ const {
+ // Variables that will change
+ info,
+ player,
+ tutorial,
+ vboxInfo,
+ // Static
+ clearTutorial,
+ itemInfo,
+ instance,
+ } = props;
-class Info extends preact.Component {
- shouldComponentUpdate(newProps) {
- // Single variable props
- if (newProps.info !== this.props.info) return true;
- if (newProps.player !== this.props.player) return true;
- if (newProps.tutorial !== this.props.tutorial) return true;
- if (newProps.vboxInfo !== this.props.vboxInfo) return true;
- return false;
+ if (tutorial) {
+ const tutorialStageInfo = tutorialStage(tutorial, clearTutorial, instance);
+ if (tutorialStageInfo) return tutorialStageInfo;
}
- render(props) {
- const {
- // Variables that will change
- info,
- player,
- tutorial,
- vboxInfo,
- // Static
- ws,
- itemInfo,
- instance,
- } = props;
+ // Prioritise the vbox info
+ if (vboxInfo) return genItemInfo(vboxInfo, itemInfo, player, info);
- if (tutorial) {
- const tutorialStageInfo = tutorialStage(tutorial, ws, instance);
- if (tutorialStageInfo) return tutorialStageInfo;
- }
-
- // Prioritise the vbox info
- if (vboxInfo) return genItemInfo(vboxInfo, itemInfo, player, info);
-
- // check normal info state
- if (!info) return false;
- if (info.includes('constructName')) {
- return (
-
-
{info.replace('constructName ', '')}
-
This is the name of your construct.
- Names are randomly generated and are purely cosmetic.
- You can change change your construct name in the RESHAPE tab outside of games.
-
This is your construct avatar.
- Avatars are randomly generated and are purely cosmetic.
- You can change your construct avatar in the RESHAPE tab outside of games.
-
-
- );
- }
-
- return genItemInfo(info, itemInfo, player, info);
+ // check normal info state
+ if (!info) return false;
+ if (info.includes('constructName')) {
+ return (
+
+
{info.replace('constructName ', '')}
+
This is the name of your construct.
+ Names are randomly generated and are purely cosmetic.
+ You can change change your construct name in the RESHAPE tab outside of games.
+
This is your construct avatar.
+ Avatars are randomly generated and are purely cosmetic.
+ You can change your construct avatar in the RESHAPE tab outside of games.
+