Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static createStateContext(crumbs, crumb) {
var stateContext = new StateContext();
var {state, data, url, title} = crumbs[crumb];
stateContext.state = state;
stateContext.data = data;
stateContext.url = url;
stateContext.title = title;
stateContext.crumbs = crumbs.slice(0, crumb);
stateContext.nextCrumb = crumbs[crumb];
if (crumb > 1) {
var {state, data, url} = crumbs[crumb - 1];
stateContext.previousState = stateContext.oldState = state;
stateContext.previousData = stateContext.oldData = data;
stateContext.previousUrl = stateContext.oldUrl = url;
}
return stateContext;
}
componentDidMount() {
static createStateContext(crumbs: Crumb[], nextCrumb: Crumb, crumb: number) {
var stateContext = new StateContext();
var {state, data, url, title} = crumbs[crumb];
stateContext.state = state;
stateContext.data = data;
stateContext.url = url;
stateContext.title = title;
stateContext.crumbs = crumbs.slice(0, crumb);
stateContext.nextCrumb = crumbs[crumb];
var {state, data, url} = nextCrumb;
stateContext.oldState = state;
stateContext.oldData = data;
stateContext.oldUrl = url;
if (crumb > 1) {
var {state, data, url} = crumbs[crumb - 1];
stateContext.previousState = state;
stateContext.previousData = data;
stateContext.previousUrl = url;
static createStateContext(crumbs: Crumb[], nextCrumb: Crumb, crumb: number) {
var stateContext = new StateContext();
var {state, data, url, title} = crumbs[crumb];
stateContext.state = state;
stateContext.data = data;
stateContext.url = url;
stateContext.title = title;
stateContext.crumbs = crumbs.slice(0, crumb);
stateContext.nextCrumb = crumbs[crumb];
var {state, data, url} = nextCrumb;
stateContext.oldState = state;
stateContext.oldData = data;
stateContext.oldUrl = url;
if (crumb > 1) {
var {state, data, url} = crumbs[crumb - 1];
stateContext.previousState = state;
stateContext.previousData = data;
stateContext.previousUrl = url;
static createStateContext(crumbs, crumb) {
var stateContext = new StateContext();
var {state, data, url, title} = crumbs[crumb];
stateContext.state = state;
stateContext.data = data;
stateContext.url = url;
stateContext.title = title;
stateContext.crumbs = crumbs.slice(0, crumb);
stateContext.nextCrumb = crumbs[crumb];
if (crumb > 1) {
var {state, data, url} = crumbs[crumb - 1];
stateContext.previousState = stateContext.oldState = state;
stateContext.previousData = stateContext.oldData = data;
stateContext.previousUrl = stateContext.oldUrl = url;
}
return stateContext;
}
componentDidMount() {
static createStateContext(crumbs, crumb) {
var stateContext = new StateContext();
var {state, data, url, title} = crumbs[crumb];
stateContext.state = state;
stateContext.data = data;
stateContext.url = url;
stateContext.title = title;
stateContext.crumbs = crumbs.slice(0, crumb);
stateContext.nextCrumb = crumbs[crumb];
if (crumb > 1) {
var {state, data, url} = crumbs[crumb - 1];
stateContext.previousState = stateContext.oldState = state;
stateContext.previousData = stateContext.oldData = data;
stateContext.previousUrl = stateContext.oldUrl = url;
}
return stateContext;
}
componentDidMount() {