Skip to content

Commit e58bb38

Browse files
MichaelDeBoeySaraVieira
authored andcommitted
🔨 Switch NotFound to use useOvermind (codesandbox#2528)
1 parent d018244 commit e58bb38

File tree

1 file changed

+14
-7
lines changed
  • packages/app/src/app/pages/common/NotFound

1 file changed

+14
-7
lines changed
Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
1-
import React from 'react';
2-
import { inject, hooksObserver } from 'app/componentConnectors';
3-
41
import { Button } from '@codesandbox/common/lib/components/Button';
52
import { newSandboxWizard } from '@codesandbox/common/lib/utils/url-generator';
3+
import React, { FunctionComponent } from 'react';
4+
5+
import { useOvermind } from 'app/overmind';
66

77
import { Container, Title, SubTitle, Buttons } from './elements';
88

9-
export const NotFound = inject('store')(
10-
hooksObserver(({ store: { hasLogIn } }) => (
9+
export const NotFound: FunctionComponent = () => {
10+
const {
11+
state: { hasLogIn },
12+
} = useOvermind();
13+
14+
return (
1115
<Container>
1216
<Title>404</Title>
17+
1318
<SubTitle>
1419
We could not find the page you
1520
{"'"}
1621
re looking for.
1722
</SubTitle>
23+
1824
<Buttons>
1925
<Button small block style={{ margin: '.5rem' }} to={newSandboxWizard()}>
2026
Create Sandbox
2127
</Button>
28+
2229
<Button small block style={{ margin: '.5rem' }} href="/">
2330
{hasLogIn ? 'Dashboard' : 'Homepage'}
2431
</Button>
2532
</Buttons>
2633
</Container>
27-
))
28-
);
34+
);
35+
};
2936

3037
// eslint-disable-next-line import/no-default-export
3138
export default NotFound;

0 commit comments

Comments
 (0)