|
1 | 1 | import React, { useEffect } from 'react'; |
2 | 2 | import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; |
3 | 3 | import Margin from '@codesandbox/common/lib/components/spacing/Margin'; |
4 | | -import { inject, hooksObserver } from 'app/componentConnectors'; |
| 4 | +import { useOvermind } from 'app/overmind'; |
5 | 5 | import { Title } from 'app/components/Title'; |
6 | 6 | import { SubTitle } from 'app/components/SubTitle'; |
7 | 7 | import { Navigation } from 'app/pages/common/Navigation'; |
8 | 8 | import { Container, Content, Code } from './elements'; |
9 | 9 |
|
10 | | -const CLIInstructions = inject('signals')( |
11 | | - hooksObserver(({ signals: { cliInstructionsMounted } }) => { |
12 | | - useEffect(() => { |
13 | | - cliInstructionsMounted(); |
14 | | - }, [cliInstructionsMounted]); |
15 | | - |
16 | | - return ( |
17 | | - <MaxWidth> |
18 | | - <Margin vertical={1.5} horizontal={1.5}> |
19 | | - <Container> |
20 | | - <Navigation title="CLI Import" /> |
21 | | - |
22 | | - <Content vertical> |
23 | | - <Title>Import from CLI</Title> |
24 | | - |
25 | | - <SubTitle> |
26 | | - 1. Install the CLI <Code>npm i -g codesandbox</Code> |
27 | | - </SubTitle> |
28 | | - |
29 | | - <SubTitle> |
30 | | - 2. Go to your project <Code>cd path-of-your-project</Code> |
31 | | - </SubTitle> |
32 | | - |
33 | | - <SubTitle> |
34 | | - 3. Deploy your project to CodeSandbox{' '} |
35 | | - <Code>codesandbox ./</Code> |
36 | | - </SubTitle> |
37 | | - </Content> |
38 | | - </Container> |
39 | | - </Margin> |
40 | | - </MaxWidth> |
41 | | - ); |
42 | | - }) |
43 | | -); |
| 10 | +const CLIInstructions: React.FC = () => { |
| 11 | + const { |
| 12 | + actions: { cliInstructionsMounted }, |
| 13 | + } = useOvermind(); |
| 14 | + |
| 15 | + useEffect(() => { |
| 16 | + cliInstructionsMounted(); |
| 17 | + }, [cliInstructionsMounted]); |
| 18 | + |
| 19 | + return ( |
| 20 | + <MaxWidth> |
| 21 | + <Margin vertical={1.5} horizontal={1.5}> |
| 22 | + <Container> |
| 23 | + <Navigation title="CLI Import" /> |
| 24 | + |
| 25 | + <Content vertical> |
| 26 | + <Title>Import from CLI</Title> |
| 27 | + |
| 28 | + <SubTitle> |
| 29 | + 1. Install the CLI <Code>npm i -g codesandbox</Code> |
| 30 | + </SubTitle> |
| 31 | + |
| 32 | + <SubTitle> |
| 33 | + 2. Go to your project <Code>cd path-of-your-project</Code> |
| 34 | + </SubTitle> |
| 35 | + |
| 36 | + <SubTitle> |
| 37 | + 3. Deploy your project to CodeSandbox <Code>codesandbox ./</Code> |
| 38 | + </SubTitle> |
| 39 | + </Content> |
| 40 | + </Container> |
| 41 | + </Margin> |
| 42 | + </MaxWidth> |
| 43 | + ); |
| 44 | +}; |
44 | 45 |
|
45 | 46 | // eslint-disable-next-line import/no-default-export |
46 | 47 | export default CLIInstructions; |
0 commit comments