diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Deployment/Netlify/SiteInfo/SiteInfo.tsx b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Deployment/Netlify/SiteInfo/SiteInfo.tsx index 11fd66e6561..7072feedbd8 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Deployment/Netlify/SiteInfo/SiteInfo.tsx +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Deployment/Netlify/SiteInfo/SiteInfo.tsx @@ -1,5 +1,5 @@ -import React from 'react'; -import { inject, hooksObserver } from 'app/componentConnectors'; +import React, { FunctionComponent } from 'react'; +import { useOvermind } from 'app/overmind'; import getNetlifyConfig from 'app/utils/getNetlifyConfig'; @@ -29,43 +29,43 @@ const getFunctionDir = sandbox => { } }; -export const SiteInfo = inject('store')( - hooksObserver( - ({ - store: { - deployment: { building, netlifyLogs, netlifySite }, - editor: { currentSandbox }, +export const SiteInfo: FunctionComponent = () => { + const { + state: { + deployment: { + building, + netlifyLogs, + netlifySite: { id, name }, }, - }) => { - const functionDirectory = getFunctionDir(currentSandbox); - const functions = functionDirectory - ? currentSandbox.modules.filter( - ({ directoryShortid }) => - directoryShortid === functionDirectory.shortid - ) - : []; + editor: { currentSandbox }, + }, + } = useOvermind(); + const functionDirectory = getFunctionDir(currentSandbox); + const functions = functionDirectory + ? currentSandbox.modules.filter( + ({ directoryShortid }) => directoryShortid === functionDirectory.shortid + ) + : []; - return ( - - Sandbox Site + return ( + + Sandbox Site - - - - {netlifySite.name} + + + + {name} - {!building &&
Building
} + {!building &&
Building
} - {functions.length ? : null} + {functions.length ? : null} - + - {netlifyLogs ? : null} -
-
-
-
- ); - } - ) -); + {netlifyLogs ? : null} + + + +
+ ); +};