Skip to content

Instantly share code, notes, and snippets.

@phd20
Created March 22, 2019 01:06
Show Gist options
  • Save phd20/a12ec51533b634769c3a6e9efdd60644 to your computer and use it in GitHub Desktop.
Save phd20/a12ec51533b634769c3a6e9efdd60644 to your computer and use it in GitHub Desktop.
Container for main component
import { connect } from "react-redux";
import Dashboard from "./dashboard";
import { ApplicationState } from "../../store";
import { sessionsArraySelector } from "../../store/selectors/sessions";
const mapStateToProps = (state: ApplicationState) => {
return {
user: state.oidc.user,
sessions: sessionsArraySelector(state),
};
};
export default connect(mapStateToProps)(Dashboard);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment