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:
parent
c3467abe34
commit
17f94c58c7
@ -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({
|
||||
|
||||
@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user