1

I'm trying to extract user data when user is logged, but when is check my console specially firebase profile only appear me this, but I need to see user data from my "users" collection.

enter image description here

this is my index.js

const store = createStore(
  rootReducer,
  compose(
    applyMiddleware(thunk.withExtraArgument({ getFirebase, getFirestore }))
  )
);

const rrfProps = {
  firebase,
  config: fbConfig,
  dispatch: store.dispatch,
  createFirestoreInstance,
  attachAuthIsReady: true,
  useFirestoreForProfile: true,
  userProfile: "users", 
};

this is my component

function NavBar(props) {
  const { auth, profile } = props;
  // console.log(auth);
  const links = auth.uid ? (
    <SignedInLinks profile={profile} />
  ) : (
    <SignedOutLinks />
  );

  console.log(auth.id);

  return (
    <nav className="nav-wrapper">
      <div className="container">
        <Link to="/" className="brand-logo">
          MarioPlan
        </Link>
        <ul id="nav-mobile" className="right hide-on-med-and-down">
          {links}
        </ul>
      </div>
    </nav>
  );
}

const mapStateToProps = (state) => {
  console.log(state);
  return {
    auth: state.firebase.auth,
    profile: state.firebase.profile,
  };
};

export default connect(mapStateToProps)(NavBar);
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • What is the `rrfProps` object? I assume it's some add-on library that is supposed to store the data, but I don't recognize it. A name and link (or tag) would be really helpful. – Frank van Puffelen Apr 06 '21 at 00:25
  • 1
    I'm following the next doc http://react-redux-firebase.com/docs/recipes/profile.html but in my project dosen't works – Alberto Ornelas Apr 06 '21 at 00:42

0 Answers0