{"size": 567, "ext": "js", "max_stars_repo_path": "client/modules/users/containers/friend_requests.js", "max_stars_repo_name": "fossabot/Socialize-starter", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/modules/users/containers/friend_requests.js", "max_issues_repo_name": "fossabot/Socialize-starter", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/modules/users/containers/friend_requests.js", "max_forks_repo_name": "fossabot/Socialize-starter", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.652173913, "max_line_length": 79, "alphanum_fraction": 0.684303351}
import { useDeps, composeAll, composeWithTracker } from 'mantra-core';

import FriendRequests from '../components/friend_requests.jsx';

export const composer = ({ context }, onData) => {
  const { Meteor } = context();

  if (Meteor.subscribe('friends.requests').ready()) {
    const requests = Meteor.requests.find({ userId: Meteor.userId() }).fetch();

    onData(null, { requests });
  }
};

export const depsMapper = context => ({
  context: () => context,
});

export default composeAll(
  composeWithTracker(composer),
  useDeps(depsMapper)
)(FriendRequests);
