Skip to content

Commit eb67295

Browse files
committed
migration
1 parent 2235673 commit eb67295

File tree

6 files changed

+43
-73
lines changed

6 files changed

+43
-73
lines changed

front/src/pages/protected/Protected.js

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React, { PureComponent } from 'react';
2+
import { RouteComponentProps } from 'react-router';
3+
import FadeInEntrance from '../../components/fadeInEntrance';
4+
5+
// #region types
6+
type Props = {} & RouteComponentProps<any, any>;
7+
// #endregion
8+
9+
function Protected({}: Props) {
10+
return (
11+
<FadeInEntrance>
12+
<h1>Protected view</h1>
13+
<h3>If you can read, it means you are authenticated</h3>
14+
</FadeInEntrance>
15+
);
16+
}
17+
18+
Protected.displayName = 'Protected';
19+
20+
export default Protected;

front/src/pages/protected/__tests__/Protected.test.js

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import React from 'react';
2+
import { shallow } from 'enzyme';
3+
import { MemoryRouter } from 'react-router';
4+
import Protected from '../Protected';
5+
6+
describe('Protected page', () => {
7+
it('renders as expected', () => {
8+
const component = shallow(
9+
<div>
10+
<MemoryRouter>
11+
<Protected />
12+
</MemoryRouter>
13+
</div>,
14+
);
15+
expect(component).toMatchSnapshot();
16+
});
17+
});

front/src/pages/protected/index.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

front/src/pages/protected/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
import { compose } from 'redux';
3+
import Protected from './Protected';
4+
5+
6+
export default compose()(Protected);

0 commit comments

Comments
 (0)