Skip to content

Commit 8ad2cbe

Browse files
chinmaychaudharySaraVieira
authored andcommitted
🔨 Refactored 🧠 Overmind Hacktober | app/pages/index.tsx : ref… (codesandbox#2630)
1 parent 7d2f267 commit 8ad2cbe

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎packages/app/src/app/pages/index.tsx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import send, { DNT } from '@codesandbox/common/lib/utils/analytics';
88
import theme from '@codesandbox/common/lib/theme';
99
import { Button } from '@codesandbox/common/lib/components/Button';
1010
import Loadable from 'app/utils/Loadable';
11-
import { inject, hooksObserver } from 'app/componentConnectors';
11+
import { useOvermind } from 'app/overmind';
1212
import { ErrorBoundary } from './common/ErrorBoundary';
1313
import HTML5Backend from './common/HTML5BackendWithFolderSupport';
1414
import Modals from './common/Modals';
@@ -55,7 +55,10 @@ const CodeSadbox = () => this[`💥`].kaboom();
5555

5656
const Boundary = withRouter(ErrorBoundary);
5757

58-
const RoutesComponent = ({ signals: { appUnmounted } }) => {
58+
const RoutesComponent: React.FC = () => {
59+
const {
60+
actions: { appUnmounted },
61+
} = useOvermind();
5962
useEffect(() => () => appUnmounted(), [appUnmounted]);
6063

6164
return (
@@ -120,6 +123,6 @@ const RoutesComponent = ({ signals: { appUnmounted } }) => {
120123
);
121124
};
122125

123-
export const Routes = inject('signals')(
124-
DragDropContext(HTML5Backend)(withRouter(hooksObserver(RoutesComponent)))
126+
export const Routes = DragDropContext(HTML5Backend)(
127+
withRouter(RoutesComponent)
125128
);

0 commit comments

Comments
 (0)