Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var scrollHistory = (0, _useStandardScroll2.default)(function () {
return _reactRouter.browserHistory;
})();
var React = require('react');
var S = require('string');
var browserHistory = require('react-router').browserHistory;
var Style = require('./Style.jsx');
var ListItem = require('./ListItem.jsx');
var ButtonPrimary = require('../Button/Index.jsx').Primary;
var Input = require('../Form/Index.jsx').Input;
var ChurchStore = require('../../stores/ChurchStore');
var Churches = React.createClass({
getInitialState: function () {
return {
churches: [],
isLoading: true,
}
},
componentWillMount: function () {
ChurchStore.get(function (docs) {
var React = require('react');
var browserHistory = require('react-router').browserHistory;
var Style = require('./Style.jsx');
var ButtonSecondaryLarge = require('../Button/Index.jsx').Secondary.Large;
var Navigation = React.createClass({
render: function () {
return (
<div style="{Style.navigationContainer}">
<div>
<div style="{{padding:"0"}}">
</div>
</div>
</div>
)
},
var React = require('react');
var $ = require('jquery');
var browserHistory = require('react-router').browserHistory;
var Style = require('./Style.jsx');
var ListItem = React.createClass({
getInitialState: function () {
return {
isHovered: ''
}
},
componentWillMount: function () {
this.setState({
isHovered: false,
});
},
render: function () {
'Logout',
React.createElement('span', { className: 'glyphicon glyphicon-log-out pull-right logout-icon' })
)
)
)
),
props.children
);
};
ReactDOM.render(React.createElement(
_reactRedux.Provider,
{ store: store },
React.createElement(
_reactRouter.Router,
{ history: _reactRouter.browserHistory },
React.createElement(
_reactRouter.Route,
{ path: '/', component: App },
React.createElement(_reactRouter.IndexRoute, { component: _dashboard.Dashboard }),
React.createElement(_reactRouter.Route, { path: '/dashboard', component: _dashboard.Dashboard })
)
)
), document.getElementById('content'));
var _ = require('underscore');
var browserHistory = require('react-router').browserHistory;
var Provider = require('react-redux').Provider;
var React = require('react');
var ReactDOM = require('react-dom');
var Router = require('react-router').Router;
var routes = require('./components/routes');
var Store = require('./store');
var state;
try {
state = JSON.parse(document.getElementById('react-state').innerHTML);
} catch (err) {
switch (err.name) {
case 'SyntaxError':
global.location.reload(true);
break;
return acc || err.status === 401;
}, false);
if (unauthed) {
localStorage.clear();
that.setState({
user: result.data.getUser,
loading: false
});
}
} else {
localStorage.setItem('currentUsername', result.data.getUser.username);
that.setState({
user: result.data.getUser,
loading: false
});
_reactRouter.browserHistory.push('/home');
}
},
error: function error(_error) {
setTimeout(function () {
_reactRouter.browserHistory.push('/');
}, 600);
}).catch(function (err) {
}, function (err) {
var location = _reactRouter.browserHistory.getCurrentLocation();
if (err.response && err.response.status === 403) {
return _reactRouter.browserHistory.push('/login?redirect=' + encodeURIComponent(location.pathname + location.search + location.hash));
}
return Promise.reject(err);
});