Blame view

imports/client/views/etc/index.js 1.16 KB
b48d5cb1c   Deepak   added css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  // import { InviteSignupController } from '/imports/client/views/invite/signup/index'
  import _                                  from 'lodash';
  import {
           composeWithTracker,
           compose,
           composeAll
         }                                  from 'react-komposer';
  import { InviteSignupView }               from './InviteSignupView';
  import { Loading }                        from '/imports/client/components/Loading';
  
  import { Invitations }                    from '/imports/collections/invitations/index';
  import { Orgs }                           from '/imports/collections/orgs/index';
  
  const meteorTick = (props, onData) => {
  
    const handles = [
      Meteor.subscribe('invitations.withToken')
    ];
  
    if(_.every(handles, (handle) => (handle.ready()) )) {
      const invitation = Invitations.findOne({});
      onData(null, {
        data: {
        },
      });
    }
  
    return () => {
      _.each(handles, (handle) => handle.stop() );
    };
  };
  
  
  const reduxTick = (props, onData) => {
    onData(null, {
      data: {}
    });
  };
  
  
  export const InviteSignupController = composeAll(
    composeWithTracker(meteorTick, Loading),
    compose(reduxTick, Loading),
  )(InviteSignupView);