1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix build

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-03-16 10:59:36 -04:00
parent c3467abe34
commit 17f94c58c7
2 changed files with 6 additions and 10 deletions

View File

@ -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({

View File

@ -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 = <><Icon svg="logo-lens" big /> <h2>{this.workspace.name}</h2></>;
const header = <><Icon svg="logo-lens" big /> <h2>{workspaceStore.currentWorkspace.name}</h2></>;
return (
<PageLayout className="LandingOverview flex" header={header} provideBackButtonNavigation={showBackButton} showOnTop={true}>
<WorkspaceOverview workspace={this.workspace}/>
<WorkspaceOverview />
</PageLayout>
);
}