From cfff53bf1a79fe1d3a4a2303ab737a014c3e2302 Mon Sep 17 00:00:00 2001 From: Josue Date: Fri, 30 Apr 2021 11:52:35 -0400 Subject: [PATCH] refactor: move SharedStorage to their own module --- .../components/{ => SharedStorage}/SharedStorage.tsx | 8 ++++---- .../components/{ => SharedStorage}/SharedStorageNode.tsx | 6 +++--- striker-ui/components/SharedStorage/index.tsx | 3 +++ 3 files changed, 10 insertions(+), 7 deletions(-) rename striker-ui/components/{ => SharedStorage}/SharedStorage.tsx (90%) rename striker-ui/components/{ => SharedStorage}/SharedStorageNode.tsx (94%) create mode 100644 striker-ui/components/SharedStorage/index.tsx diff --git a/striker-ui/components/SharedStorage.tsx b/striker-ui/components/SharedStorage/SharedStorage.tsx similarity index 90% rename from striker-ui/components/SharedStorage.tsx rename to striker-ui/components/SharedStorage/SharedStorage.tsx index 0ad957ef..9f528ec8 100644 --- a/striker-ui/components/SharedStorage.tsx +++ b/striker-ui/components/SharedStorage/SharedStorage.tsx @@ -2,11 +2,11 @@ import { useContext } from 'react'; import { Box } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; -import { BodyText, HeaderText } from './Text'; -import { Panel, InnerPanel, PanelHeader } from './Panels'; +import { BodyText, HeaderText } from '../Text'; +import { Panel, InnerPanel, PanelHeader } from '../Panels'; import SharedStorageNode from './SharedStorageNode'; -import PeriodicFetch from '../lib/fetchers/periodicFetch'; -import { AnvilContext } from './AnvilContext'; +import PeriodicFetch from '../../lib/fetchers/periodicFetch'; +import { AnvilContext } from '../AnvilContext'; const useStyles = makeStyles((theme) => ({ header: { diff --git a/striker-ui/components/SharedStorageNode.tsx b/striker-ui/components/SharedStorage/SharedStorageNode.tsx similarity index 94% rename from striker-ui/components/SharedStorageNode.tsx rename to striker-ui/components/SharedStorage/SharedStorageNode.tsx index bdf8f0d8..dc013793 100644 --- a/striker-ui/components/SharedStorageNode.tsx +++ b/striker-ui/components/SharedStorage/SharedStorageNode.tsx @@ -4,9 +4,9 @@ import { ClassNameMap } from '@material-ui/styles'; import * as prettyBytes from 'pretty-bytes'; -import { AllocationBar } from './Bars'; -import { BodyText } from './Text'; -import { BLUE, RED_ON } from '../lib/consts/DEFAULT_THEME'; +import { AllocationBar } from '../Bars'; +import { BodyText } from '../Text'; +import { BLUE, RED_ON } from '../../lib/consts/DEFAULT_THEME'; const selectDecorator = ( state: boolean, diff --git a/striker-ui/components/SharedStorage/index.tsx b/striker-ui/components/SharedStorage/index.tsx new file mode 100644 index 00000000..3e7bd6c7 --- /dev/null +++ b/striker-ui/components/SharedStorage/index.tsx @@ -0,0 +1,3 @@ +import SharedStorage from './SharedStorage'; + +export default SharedStorage;