From 6dc359f4a21ece572b54d8bf4c3fed4ead724dfb Mon Sep 17 00:00:00 2001 From: xusongfu Date: Mon, 1 Nov 2021 16:03:15 +0800 Subject: [PATCH] fix: Fixed the platform entrance not switching when switching projects Fix the above issue by mobox observer Change-Id: I14f14a54586c584f7e6138cfc7aad9721cdfaf7f --- src/components/Layout/GlobalHeader/RightContent.jsx | 3 +++ src/pages/storage/containers/Volume/actions/Bootable.jsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Layout/GlobalHeader/RightContent.jsx b/src/components/Layout/GlobalHeader/RightContent.jsx index 396acb59..d47bc967 100644 --- a/src/components/Layout/GlobalHeader/RightContent.jsx +++ b/src/components/Layout/GlobalHeader/RightContent.jsx @@ -13,10 +13,13 @@ // limitations under the License. import React, { PureComponent } from 'react'; +import { inject, observer } from 'mobx-react'; import { Button, Col, Row } from 'antd'; import Avatar from './AvatarDropdown'; import styles from './index.less'; +@inject('rootStore') +@observer export class GlobalHeaderRight extends PureComponent { get isAdminPage() { const { isAdminPage = false } = this.props; diff --git a/src/pages/storage/containers/Volume/actions/Bootable.jsx b/src/pages/storage/containers/Volume/actions/Bootable.jsx index c25242fa..2a7e7670 100644 --- a/src/pages/storage/containers/Volume/actions/Bootable.jsx +++ b/src/pages/storage/containers/Volume/actions/Bootable.jsx @@ -14,7 +14,7 @@ import { inject, observer } from 'mobx-react'; import { ModalAction } from 'containers/Action'; -import globalVolumeStore from '@/stores/cinder/volume'; +import globalVolumeStore from 'stores/cinder/volume'; @inject('rootStore') @observer