Skip to content

Commit 4f363fd

Browse files
committed
refactor SignOutNoticeModal
1 parent 438884a commit 4f363fd

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.js renamed to packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import React from 'react';
2-
import { inject, observer } from 'app/componentConnectors';
2+
import { useOvermind } from 'app/overmind';
33

44
import { Button } from '@codesandbox/common/lib/components/Button';
55
import Row from '@codesandbox/common/lib/components/flex/Row';
66

77
import { Container, Heading, Explanation } from './elements';
88

9-
function SignOutNotice({ signals }) {
9+
export const SignOutNotice = () => {
10+
const {
11+
actions: { modalClosed, signInClicked },
12+
} = useOvermind();
1013
return (
1114
<Container>
1215
<Heading>You have been signed out</Heading>
@@ -25,21 +28,19 @@ function SignOutNotice({ signals }) {
2528
style={{ marginRight: '.5rem' }}
2629
red
2730
onClick={() => {
28-
signals.modalClosed();
31+
modalClosed();
2932
}}
3033
>
3134
Close
3235
</Button>
3336
<Button
3437
block
3538
style={{ marginLeft: '.5rem' }}
36-
onClick={() => signals.signInClicked({ useExtraScopes: false })}
39+
onClick={() => signInClicked({ useExtraScopes: false })}
3740
>
3841
Sign in
3942
</Button>
4043
</Row>
4144
</Container>
4245
);
4346
}
44-
45-
export default inject('store', 'signals')(observer(SignOutNotice));

0 commit comments

Comments
 (0)