From a94ed659846f0bc93c05bccf0c96785b91e5c78f Mon Sep 17 00:00:00 2001 From: Markandan R Date: Tue, 22 Jun 2021 10:56:34 +0530 Subject: Removed the cyclical dependency (#1519) (#1539) --- src/features/publishDebugInfo/Component.js | 2 +- src/features/publishDebugInfo/index.js | 9 ++------- src/features/publishDebugInfo/store.js | 7 +++++++ 3 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 src/features/publishDebugInfo/store.js (limited to 'src/features/publishDebugInfo') diff --git a/src/features/publishDebugInfo/Component.js b/src/features/publishDebugInfo/Component.js index 1f1b0ed45..63f15fe7b 100644 --- a/src/features/publishDebugInfo/Component.js +++ b/src/features/publishDebugInfo/Component.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { defineMessages, intlShape } from 'react-intl'; import injectSheet from 'react-jss'; -import { state as ModalState } from '.'; +import { state as ModalState } from './store'; import { sendAuthRequest } from '../../api/utils/auth'; import Button from '../../components/ui/Button'; import Input from '../../components/ui/Input'; diff --git a/src/features/publishDebugInfo/index.js b/src/features/publishDebugInfo/index.js index 7d0d310c2..51780a34e 100644 --- a/src/features/publishDebugInfo/index.js +++ b/src/features/publishDebugInfo/index.js @@ -1,15 +1,10 @@ -import { observable } from 'mobx'; +import { state as ModalState } from './store'; export { default as Component } from './Component'; +const state = ModalState; const debug = require('debug')('Ferdi:feature:publishDebugInfo'); -const defaultState = { - isModalVisible: false, -}; - -export const state = observable(defaultState); - export default function initialize() { debug('Initialize publishDebugInfo feature'); diff --git a/src/features/publishDebugInfo/store.js b/src/features/publishDebugInfo/store.js new file mode 100644 index 000000000..ed06e5a7d --- /dev/null +++ b/src/features/publishDebugInfo/store.js @@ -0,0 +1,7 @@ +import { observable } from 'mobx'; + +const defaultState = { + isModalVisible: false, +}; + +export const state = observable(defaultState); -- cgit v1.2.3-70-g09d2