Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var App = function({ children, location }) {
styles = location.action === 'POP' ? presets.slideRight : presets.slideLeft;
// console.log(location.action);
return (
<div>
<header>
{children}
</header></div>
);
};
const App = function({ children, location }) {
styles = location.action === 'POP' ? presets.slideRight : presets.slideLeft;
return (
<div>
<header>
{children}
</header></div>
);
};
const getTransition = (location) => {
let transition = presets.slideRight
if (prevLocation && isAfter(prevLocation.pathname, location.pathname)) {
transition = presets.slideLeft
}
prevLocation = location
return transition
}