major: frontend federation
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
window.orbit.getRoute = (type, returnFirst = false) => {
|
||||
let availables = window.orbit.components.filter(c => c.type == type || c.uniq == type);
|
||||
window.orbit.components.forEach(c => {
|
||||
if (c.extensions) {
|
||||
c.extensions.forEach(e => {
|
||||
if (e.type == type || e.uniq == type) {
|
||||
availables.push(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (availables.length > 1) {
|
||||
if (returnFirst) {
|
||||
return availables[0].route;
|
||||
} else {
|
||||
return availables[availables.length - 1].route;
|
||||
}
|
||||
} else if (availables.length < 1) {
|
||||
console.error(`No component found for route ${type}`);
|
||||
} else {
|
||||
return availables[0].route;
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
if (typeof Sentry !== 'undefined') {
|
||||
Sentry.init({
|
||||
dsn: 'https://b4b29557689049a39168599577adb940@sentry.startinblox.com/4',
|
||||
integrations: [new Sentry.Integrations.BrowserTracing()],
|
||||
environment: document.location.hostname,
|
||||
tracesSampleRate: 0.2,
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user