todos-contra-el-fuego-web/imports/ui/components/Utils/location.js
2018-02-07 15:27:12 +01:00

13 lines
325 B
JavaScript

import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
export const location = new ReactiveVar();
export const currentLocation = () => {
if (Meteor.isClient) {
return window.location.pathname;
}
return location.get();
};
export const isHome = () => currentLocation() === '/';