Blame view
imports/client/views/nonOrg/app/module/AppLayout.js
2.68 KB
878ca8a15
|
1 2 3 4 5 6 7 8 9 |
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'; |
b02441289
|
10 |
import { VerifyModule } from '/imports/client/views/verify/module/index' |
878ca8a15
|
11 12 |
import Signup from '/imports/client/views/nonOrg/enter/SignupView'; |
d2e129825
|
13 14 |
import { Collapse, Navbar, NavbarToggler, NavbarBrand, Nav, NavItem, NavLink } from 'reactstrap'; |
878ca8a15
|
15 16 |
export class AppLayout extends Component { |
d2e129825
|
17 18 19 20 21 22 23 24 25 26 27 28 29 |
constructor(props) { super(props); this.toggle = this.toggle.bind(this); this.state = { isOpen: false }; } toggle() { this.setState({ isOpen: !this.state.isOpen }); } |
878ca8a15
|
30 31 32 |
render() { const {user, org} = this.props.data; console.log(user); |
d2e129825
|
33 |
console.log(org); |
878ca8a15
|
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
if(!user) { return ( <Signup /> ); } if(!user.isEmailVerified()) { return ( <VerifyModule pane = {this.props.location.query.verify} location = {this.props.location} /> ); } |
d2e129825
|
49 50 |
const theUrl = Meteor.absoluteUrl(); OrgUrl = theUrl.replace("http://","http://"+org.slug+"."); |
878ca8a15
|
51 52 |
return ( <div className = "appLayout-box"> |
d2e129825
|
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
<Navbar color="faded" light toggleable> <NavbarToggler right onClick={this.toggle} /> <NavbarBrand href="/">reactstrap</NavbarBrand> <Collapse isOpen={this.state.isOpen} navbar> <Nav className="ml-auto" navbar> <NavItem> <NavLink href="/components/">Components</NavLink> </NavItem> <NavItem> <NavLink href="https://github.com/reactstrap/reactstrap">Github</NavLink> </NavItem> </Nav> </Collapse> </Navbar> |
878ca8a15
|
67 68 69 70 71 72 |
<div className = "appLayout-wrapOuter"> <div className = "appLayout-wrapInner"> <div className = "appLayout-menuWrap"> </div> <div className = "appLayout-contentWrap"> <div className = "appLayout-content"> |
d2e129825
|
73 74 |
Hi, {user.getFullName()}, Please visit your organization page by <a href={OrgUrl}>clicking here </a> and login using your credentials! |
878ca8a15
|
75 76 77 78 79 80 81 82 83 |
</div> </div> </div> </div> </div> ); }; }; |