@vuu-ui/vuu-shell 0.8.26-debug → 0.8.27-debug

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.js CHANGED
@@ -2967,6 +2967,7 @@ var Shell = ({
2967
2967
  const layoutId = (0, import_react20.useRef)("latest");
2968
2968
  const { applicationJson, saveApplicationLayout, loadLayoutById } = useLayoutManager();
2969
2969
  const { buildMenuOptions, handleMenuAction } = useLayoutContextMenuItems(setDialogState);
2970
+ const [connectionStatus, setConnectionStatus] = (0, import_react20.useState)("connected");
2970
2971
  const handleLayoutChange = (0, import_react20.useCallback)(
2971
2972
  (layout) => {
2972
2973
  try {
@@ -2989,13 +2990,14 @@ var Shell = ({
2989
2990
  },
2990
2991
  [loadLayoutById]
2991
2992
  );
2992
- (0, import_react20.useEffect)(() => {
2993
+ (0, import_react20.useMemo)(async () => {
2993
2994
  if (serverUrl && user.token) {
2994
- (0, import_vuu_data_remote2.connectToServer)({
2995
+ const connectionStatus2 = await (0, import_vuu_data_remote2.connectToServer)({
2995
2996
  authToken: user.token,
2996
2997
  url: serverUrl,
2997
2998
  username: user.username
2998
2999
  });
3000
+ setConnectionStatus(connectionStatus2);
2999
3001
  }
3000
3002
  }, [serverUrl, user.token, user.username]);
3001
3003
  const [themeClass, densityClass, dataMode] = (0, import_vuu_utils7.useThemeAttributes)();
@@ -3015,6 +3017,9 @@ var Shell = ({
3015
3017
  }
3016
3018
  )
3017
3019
  });
3020
+ if (connectionStatus === "rejected") {
3021
+ console.log("game over, no connection to server");
3022
+ }
3018
3023
  return isLoading ? null : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_vuu_utils7.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3019
3024
  ContextMenuProvider,
3020
3025
  {