From 4f363fd8bf96e05e1486b4370e7f3429fcc866ad Mon Sep 17 00:00:00 2001 From: Nilesh Patel Date: Sat, 5 Oct 2019 00:28:20 +0530 Subject: [PATCH] refactor SignOutNoticeModal --- .../SignOutNoticeModal/{elements.js => elements.ts} | 0 .../SignOutNoticeModal/{index.js => index.tsx} | 13 +++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) rename packages/app/src/app/pages/Sandbox/SignOutNoticeModal/{elements.js => elements.ts} (100%) rename packages/app/src/app/pages/Sandbox/SignOutNoticeModal/{index.js => index.tsx} (77%) diff --git a/packages/app/src/app/pages/Sandbox/SignOutNoticeModal/elements.js b/packages/app/src/app/pages/Sandbox/SignOutNoticeModal/elements.ts similarity index 100% rename from packages/app/src/app/pages/Sandbox/SignOutNoticeModal/elements.js rename to packages/app/src/app/pages/Sandbox/SignOutNoticeModal/elements.ts diff --git a/packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.js b/packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.tsx similarity index 77% rename from packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.js rename to packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.tsx index 2b1dbe2e79a..a8bf1c41f69 100644 --- a/packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.js +++ b/packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.tsx @@ -1,12 +1,15 @@ import React from 'react'; -import { inject, observer } from 'app/componentConnectors'; +import { useOvermind } from 'app/overmind'; import { Button } from '@codesandbox/common/lib/components/Button'; import Row from '@codesandbox/common/lib/components/flex/Row'; import { Container, Heading, Explanation } from './elements'; -function SignOutNotice({ signals }) { +export const SignOutNotice = () => { + const { + actions: { modalClosed, signInClicked }, + } = useOvermind(); return ( You have been signed out @@ -25,7 +28,7 @@ function SignOutNotice({ signals }) { style={{ marginRight: '.5rem' }} red onClick={() => { - signals.modalClosed(); + modalClosed(); }} > Close @@ -33,7 +36,7 @@ function SignOutNotice({ signals }) { @@ -41,5 +44,3 @@ function SignOutNotice({ signals }) { ); } - -export default inject('store', 'signals')(observer(SignOutNotice));