AppLayout.js
2.12 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import _ from 'lodash';
import { Meteor } from 'meteor/meteor';
import React, { Component } from 'react';
import { Link } from 'react-router';
import { Avatar } from '/imports/client/components/Avatar';
import { Icon } from '/imports/client/components/Icon';
import classNames from 'classnames';
import { logout } from '/imports/client/app/utils/loginMethods';
import { VerifyModule } from '/imports/client/views/verify/module/index'
import Signup from '/imports/client/views/nonOrg/enter/SignupView';
import { Collapse, Navbar, NavbarToggler,
NavbarBrand, Nav, NavItem, NavLink } from 'reactstrap';
export class AppLayout extends Component {
constructor(props) {
super(props);
this.toggle = this.toggle.bind(this);
this.state = {
isOpen: false
};
}
toggle() {
this.setState({
isOpen: !this.state.isOpen
});
}
render() {
const {user, org} = this.props.data;
console.log(user);
console.log(org);
if(!user) {
return (
<Signup
/>
);
}
if(!user.isEmailVerified()) {
return (
<VerifyModule
pane = {this.props.location.query.verify}
location = {this.props.location}
/>
);
}
const theUrl = Meteor.absoluteUrl();
OrgUrl = theUrl.replace("http://","http://"+org.slug+".");
return (
<div className = "appLayout-box">
<div className = "appLayout-wrapOuter">
<div className = "appLayout-wrapInner">
<div className = "appLayout-menuWrap">
</div>
<div className = "appLayout-contentWrap">
<div className = "appLayout-content">
Hi, {user.getFullName()},
Please visit your organization page by <a href={OrgUrl}>clicking here </a> and login using your credentials!
</div>
</div>
</div>
</div>
</div>
);
};
};