diff --git a/src/common/workspace-store.ts b/src/common/workspace-store.ts
index 45bc857da2..818288d5fb 100644
--- a/src/common/workspace-store.ts
+++ b/src/common/workspace-store.ts
@@ -132,9 +132,9 @@ export class Workspace implements WorkspaceModel, WorkspaceState {
Object.assign(this, state);
}
- @action [updateFromModel](model: WorkspaceModel) {
+ [updateFromModel] = action((model: WorkspaceModel) => {
Object.assign(this, model);
- }
+ });
toJSON(): WorkspaceModel {
return toJS({
diff --git a/src/renderer/components/+landing-page/landing-page.tsx b/src/renderer/components/+landing-page/landing-page.tsx
index 15e22b2c9f..830c0eb714 100644
--- a/src/renderer/components/+landing-page/landing-page.tsx
+++ b/src/renderer/components/+landing-page/landing-page.tsx
@@ -3,7 +3,7 @@ import React from "react";
import { computed, observable } from "mobx";
import { observer } from "mobx-react";
import { clusterStore } from "../../../common/cluster-store";
-import { Workspace, workspaceStore } from "../../../common/workspace-store";
+import { workspaceStore } from "../../../common/workspace-store";
import { WorkspaceOverview } from "./workspace-overview";
import { PageLayout } from "../layout/page-layout";
import { Notifications } from "../notifications";
@@ -13,13 +13,9 @@ import { Icon } from "../icon";
export class LandingPage extends React.Component {
@observable showHint = true;
- get workspace(): Workspace {
- return workspaceStore.currentWorkspace;
- }
-
@computed
get clusters() {
- return clusterStore.getByWorkspaceId(this.workspace.id);
+ return clusterStore.getByWorkspaceId(workspaceStore.currentWorkspaceId);
}
componentDidMount() {
@@ -36,11 +32,11 @@ export class LandingPage extends React.Component {
render() {
const showBackButton = this.clusters.length > 0;
- const header = <>