Skip to content

Commit d414746

Browse files
hetpatel33CompuIves
authored andcommitted
🔨Refactored 🧠 Overmind Hacktober | /app/pages/NewSandbox/index.js : refactor to replace Cerebral with Overmind (#2748)
* refactor /app/pages/NewSandbox/index.js: convert to tsx and uses overmind * add myself as a contributor
1 parent f1c98b3 commit d414746

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,15 @@
13851385
"contributions": [
13861386
"code"
13871387
]
1388+
},
1389+
{
1390+
"login": "hetpatel33",
1391+
"name": "Het Patel",
1392+
"avatar_url": "https://avatars0.githubusercontent.com/u/13877514?v=4",
1393+
"profile": "http://hetpatel33.github.io",
1394+
"contributions": [
1395+
"code"
1396+
]
13881397
}
13891398
],
13901399
"contributorsPerLine": 7,

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-146-orange.svg?style=flat-square)](#contributors-) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
1+
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-148-orange.svg?style=flat-square)](#contributors-) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
22

33
[![Backers on Open Collective](https://opencollective.com/codesandbox/backers/badge.svg)](#backers)
44
[![Sponsors on Open Collective](https://opencollective.com/codesandbox/sponsors/badge.svg)](#sponsors)
@@ -41,7 +41,8 @@ Thanks goes to these wonderful people
4141
([emoji key](https://github.com/all-contributors/all-contributors#emoji-key)):
4242

4343
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
44-
<!-- prettier-ignore -->
44+
<!-- prettier-ignore-start -->
45+
<!-- markdownlint-disable -->
4546
<table>
4647
<tr>
4748
<td align="center"><a href="http://ivesvh.com"><img src="https://avatars0.githubusercontent.com/u/587016?v=3" width="100px;" alt="Ives van Hoorne"/><br /><sub><b>Ives van Hoorne</b></sub></a><br /><a href="#question-CompuIves" title="Answering Questions">💬</a> <a href="#blog-CompuIves" title="Blogposts">📝</a> <a href="https://github.com/codesandbox/codesandbox-client/issues?q=author%3ACompuIves" title="Bug reports">🐛</a> <a href="https://github.com/codesandbox/codesandbox-client/commits?author=CompuIves" title="Code">💻</a> <a href="#design-CompuIves" title="Design">🎨</a> <a href="https://github.com/codesandbox/codesandbox-client/commits?author=CompuIves" title="Documentation">📖</a> <a href="#example-CompuIves" title="Examples">💡</a> <a href="#infra-CompuIves" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#review-CompuIves" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/codesandbox/codesandbox-client/commits?author=CompuIves" title="Tests">⚠️</a> <a href="#tool-CompuIves" title="Tools">🔧</a></td>
@@ -232,8 +233,13 @@ Thanks goes to these wonderful people
232233
<td align="center"><a href="https://github.com/Sakthivel"><img src="https://avatars3.githubusercontent.com/u/205201?v=4" width="100px;" alt="Sakthivel Sengodan Sapient"/><br /><sub><b>Sakthivel Sengodan Sapient</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=sakthivel" title="Code">💻</a></td>
233234
<td align="center"><a href="https://github.com/vanya829"><img src="https://avatars0.githubusercontent.com/u/1397979?v=4" width="100px;" alt="vanya829"/><br /><sub><b>vanya829</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=vanya829" title="Code">💻</a></td>
234235
</tr>
236+
<tr>
237+
<td align="center"><a href="http://hetpatel33.github.io"><img src="https://avatars0.githubusercontent.com/u/13877514?v=4" width="100px;" alt="Het Patel"/><br /><sub><b>Het Patel</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=hetpatel33" title="Code">💻</a></td>
238+
</tr>
235239
</table>
236240

241+
<!-- markdownlint-enable -->
242+
<!-- prettier-ignore-end -->
237243
<!-- ALL-CONTRIBUTORS-LIST:END -->
238244

239245
## Backers

packages/app/src/app/pages/NewSandbox/index.js renamed to packages/app/src/app/pages/NewSandbox/index.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@ import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth';
44
import Margin from '@codesandbox/common/lib/components/spacing/Margin';
55
import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator';
66
import { Navigation } from 'app/pages/common/Navigation';
7-
import { inject, hooksObserver } from 'app/componentConnectors';
7+
import { useOvermind } from 'app/overmind';
88
import history from 'app/utils/history';
99
import { NewSandboxModal } from '../Dashboard/Content/CreateNewSandbox/NewSandboxModal';
1010

1111
const createSandbox = template => {
1212
history.push(sandboxUrl({ id: template.shortid }));
1313
};
1414

15-
const NewSandbox = ({ signals: { sandboxPageMounted } }) => {
15+
const NewSandbox: React.FC = () => {
16+
const {
17+
actions: { sandboxPageMounted },
18+
} = useOvermind();
19+
1620
useEffect(() => {
1721
sandboxPageMounted();
1822
}, [sandboxPageMounted]);
@@ -25,7 +29,6 @@ const NewSandbox = ({ signals: { sandboxPageMounted } }) => {
2529
>
2630
<Margin horizontal={1.5} style={{ height: '100%' }} vertical={1.5}>
2731
<Navigation title="New Sandbox" />
28-
2932
<Margin top={5}>
3033
<Centered horizontal vertical>
3134
<Margin style={{ maxWidth: '100%', width: 900 }} top={2}>
@@ -38,4 +41,4 @@ const NewSandbox = ({ signals: { sandboxPageMounted } }) => {
3841
);
3942
};
4043

41-
export default inject('signals')(hooksObserver(NewSandbox));
44+
export default NewSandbox;

0 commit comments

Comments
 (0)