From 7e864b87bab7d27a8a6a4e550ee4162b15f34e58 Mon Sep 17 00:00:00 2001 From: milapshah Date: Sun, 13 Oct 2019 02:41:07 +0530 Subject: [PATCH 1/2] Refactor|Overmind: Refactor PreviewSettings to use overmind --- .../PreviewSettings/{index.js => index.tsx} | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) rename packages/app/src/app/pages/common/Modals/PreferencesModal/EditorPageSettings/PreviewSettings/{index.js => index.tsx} (81%) diff --git a/packages/app/src/app/pages/common/Modals/PreferencesModal/EditorPageSettings/PreviewSettings/index.js b/packages/app/src/app/pages/common/Modals/PreferencesModal/EditorPageSettings/PreviewSettings/index.tsx similarity index 81% rename from packages/app/src/app/pages/common/Modals/PreferencesModal/EditorPageSettings/PreviewSettings/index.js rename to packages/app/src/app/pages/common/Modals/PreferencesModal/EditorPageSettings/PreviewSettings/index.tsx index 2952d2b7eed..6c8ac2a5289 100644 --- a/packages/app/src/app/pages/common/Modals/PreferencesModal/EditorPageSettings/PreviewSettings/index.js +++ b/packages/app/src/app/pages/common/Modals/PreferencesModal/EditorPageSettings/PreviewSettings/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { inject, observer } from 'app/componentConnectors'; +import { useOvermind } from 'app/overmind'; import { Title, @@ -10,11 +10,12 @@ import { Rule, } from '../../elements'; -function PreviewSettingsComponent({ store, signals }) { +export const PreviewSettings: React.FC = () => { + const { state, actions } = useOvermind(); const bindValue = name => ({ - value: store.preferences.settings[name], + value: state.preferences.settings[name], setValue: value => - signals.preferences.settingChanged({ + actions.preferences.settingChanged({ name, value, }), @@ -56,8 +57,4 @@ function PreviewSettingsComponent({ store, signals }) { ); -} - -export const PreviewSettings = inject('store', 'signals')( - observer(PreviewSettingsComponent) -); +}; From 76b676a1c4664f675fa9d92d7e1e6795c2eb5b74 Mon Sep 17 00:00:00 2001 From: milapshah Date: Sat, 19 Oct 2019 01:38:24 +0530 Subject: [PATCH 2/2] Adds myself in the contributor list --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 927d61efac7..bbee54db1b1 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1394,6 +1394,15 @@ "contributions": [ "code" ] + }, + { + "login": "milap1296", + "name": "milap1296", + "avatar_url": "https://avatars2.githubusercontent.com/u/19545730?v=4", + "profile": "https://github.com/milap1296", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index e060383ce33..d54630ecefc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# [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/) +# [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-149-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/) [![Backers on Open Collective](https://opencollective.com/codesandbox/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/codesandbox/sponsors/badge.svg)](#sponsors) @@ -235,6 +235,7 @@ Thanks goes to these wonderful people Het Patel
Het Patel

💻 + milap1296
milap1296

💻