diff --git a/App.js b/App.js index 9a17e88..ceb523c 100644 --- a/App.js +++ b/App.js @@ -10,6 +10,7 @@ import { import { store, persistor } from "./redux/store"; import { Provider } from "react-redux"; import { PersistGate } from "redux-persist/integration/react"; +import SignIn from "./components/signin.component"; export default function App() { return ( @@ -19,6 +20,7 @@ export default function App() { Open up App.js to start working on your app! ttt + diff --git a/components/signin.component.jsx b/components/signin.component.jsx new file mode 100644 index 0000000..d082b20 --- /dev/null +++ b/components/signin.component.jsx @@ -0,0 +1,36 @@ +import React from "react"; +import { View, Text, Button } from "react-native"; +import { createStructuredSelector } from "reselect"; + +import { + selectBodyshop, + selectCurrentUser, +} from "../redux/user/user.selectors"; +import { emailSignInStart } from "../redux/user/user.actions"; +import { connect } from "react-redux"; + +const mapStateToProps = createStructuredSelector({ + bodyshop: selectBodyshop, + currentUser: selectCurrentUser, +}); + +const mapDispatchToProps = (dispatch) => ({ + emailSignInStart: (email, password) => + dispatch(emailSignInStart({ email, password })), +}); + +export function SignIn({ bodyshop, currentUser, emailSignInStart }) { + return ( + + The secondary view + {JSON.stringify(currentUser)} +