mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Centralize all redux types into one place, add overrides for the connect, useSelector and useDispatch functions
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import React, { ComponentType } from 'react';
|
||||
import { Route, Redirect, RouteProps } from 'react-router-dom';
|
||||
import { Location } from 'history';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { connect } from 'app/functions';
|
||||
import { getActiveAccount } from 'app/components/accounts/reducer';
|
||||
import { Account } from 'app/components/accounts';
|
||||
import { RootState } from 'app/reducers';
|
||||
|
||||
interface Props extends RouteProps {
|
||||
component: ComponentType<any>;
|
||||
@@ -20,6 +20,6 @@ const PrivateRoute = ({ account, component: Component, ...rest }: Props) => (
|
||||
/>
|
||||
);
|
||||
|
||||
export default connect((state: RootState) => ({
|
||||
export default connect((state) => ({
|
||||
account: getActiveAccount(state),
|
||||
}))(PrivateRoute);
|
||||
|
||||
Reference in New Issue
Block a user