From d64a3381116077d4529e80823a1d35034d201ba8 Mon Sep 17 00:00:00 2001 From: Dusty Phillips Date: Mon, 27 Aug 2018 16:20:00 -0300 Subject: [PATCH] Clear data when logging out --- src/components/AuthButton.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/components/AuthButton.js b/src/components/AuthButton.js index e1afb80..f657535 100644 --- a/src/components/AuthButton.js +++ b/src/components/AuthButton.js @@ -29,11 +29,17 @@ class AuthButton extends Component { ) } - return - + return ( + + ) } } @@ -41,7 +47,11 @@ const mapStateToProps = state => { return { auth: state.firebase.auth } } -const mapDispatchToProps = { +const mapDispatchToProps = dispatch => { + return { + clearFirestore: () => dispatch({ type: '@@reduxFirestore/CLEAR_DATA' }) + + } }