Skip to content

Commit 40817d5

Browse files
committed
Create container to stock components work with store
1 parent 644437a commit 40817d5

22 files changed

+18
-16
lines changed

src/App/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect } from 'react';
22
import { connect, ConnectedProps } from 'react-redux';
3-
import { loadUser, logout } from 'src/components/Auth/Auth.thunks';
3+
import { loadUser, logout } from 'src/containers/Auth/Auth.thunks';
44
import { Routes } from 'src/routes';
55

66
const mapStateToProps = () => ({});

src/components/Header/RightMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { Menu, Grid } from 'antd';
33
import { NavLink } from 'react-router-dom';
44
import { LoginOutlined } from '@ant-design/icons';
5-
import { logout } from 'src/components/Auth/Auth.thunks';
5+
import { logout } from 'src/containers/Auth/Auth.thunks';
66
import { connect, ConnectedProps } from 'react-redux';
77
import { PATH } from 'src/constants/paths';
88

src/components/Home/AuthLinks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { ProductList } from 'src/components/Products/ProductList';
2+
import { ProductList } from 'src/containers/Products/ProductList';
33

44
export const AuthLinks = () => {
55
return <ProductList />;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
22
import { Form, Input, Button, Checkbox, message } from 'antd';
33
import { UserOutlined, LockOutlined } from '@ant-design/icons';
44
import { connect, ConnectedProps } from 'react-redux';
5-
import { useHistory, Link, Redirect } from 'react-router-dom';
5+
import { Link, Redirect } from 'react-router-dom';
66
import { login } from './Auth.thunks';
77
import { PATH } from 'src/constants/paths';
88

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
EllipsisOutlined,
77
SettingOutlined,
88
} from '@ant-design/icons';
9-
import { Link, useHistory } from 'react-router-dom';
9+
import { useHistory } from 'react-router-dom';
1010
import { PATH } from 'src/constants/paths';
1111
const { Meta } = Card;
1212

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useState } from 'react';
2-
import { Form, Input, Button, message } from 'antd';
2+
import { Form, Input, Button } from 'antd';
33
import { UserOutlined, LockOutlined, MailOutlined } from '@ant-design/icons';
44
import { connect, ConnectedProps } from 'react-redux';
5-
import { useHistory, Link, Redirect } from 'react-router-dom';
5+
import { Link, Redirect } from 'react-router-dom';
66
import { register } from './Auth.thunks';
77
import { PATH } from 'src/constants/paths';
88

@@ -19,7 +19,6 @@ const _Register = (props: Props) => {
1919
// eslint-disable-next-line
2020
const [error, setError] = useState('');
2121
const { register, isAuthenticated } = props;
22-
const history = useHistory();
2322

2423
const onFinish = async formData => {
2524
try {
@@ -29,6 +28,7 @@ const _Register = (props: Props) => {
2928
}
3029
};
3130
const onFinishFailed = errorInfo => {
31+
// eslint-disable-next-line
3232
console.log('Failed:', errorInfo);
3333
};
3434

0 commit comments

Comments
 (0)