File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed
packages/app/src/app/pages/Sandbox/Editor/Workspace/ConnectionNotice Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change 1- import { inject , hooksObserver } from 'app/componentConnectors' ;
2- import React from 'react' ;
1+ import React , { FunctionComponent } from 'react' ;
2+
3+ import { useOvermind } from 'app/overmind' ;
34
45import { Container } from './elements' ;
56
6- export const ConnectionNotice = inject ( 'store' ) (
7- hooksObserver (
8- ( { store : { connected } } ) =>
9- ! connected && (
10- < Container >
11- You{ "'" } re not connected to the internet. You can still edit, but you
12- cannot save. We recommend using the { "'" } Download{ "'" } function to
13- keep your changes.
14- </ Container >
15- )
16- )
17- ) ;
7+ export const ConnectionNotice : FunctionComponent = ( ) => {
8+ const {
9+ state : { connected } ,
10+ } = useOvermind ( ) ;
11+
12+ return (
13+ ! connected && (
14+ < Container >
15+ You{ "'" } re not connected to the internet. You can still edit, but you
16+ cannot save. We recommend using the { "'" } Download{ "'" } function to keep
17+ your changes.
18+ </ Container >
19+ )
20+ ) ;
21+ } ;
You can’t perform that action at this time.
0 commit comments