jcbantuelle/dominion-meteor

View on GitHub
app/layout/client/layout.js

Summary

Maintainability
A
55 mins
Test Coverage
import { FlowRouter } from 'meteor/ostrio:flow-router-extra'

Template.layout.onCreated(function() {
  Streamy.on('account_inactivated', function() {
    FlowRouter.go(`/approval`)
  })
})

Template.layout.events({
  'click .js-logout': function() {
    Meteor.logout(function() {
      FlowRouter.go('/')
    })
  },
  'click .nav-link, click .navbar-brand': function(event) {
    event.preventDefault()
    FlowRouter.go(event.target.getAttribute('href'))
  },
  'click': function() {
    $('.popover').remove()
  }
})