cartodb-4.42/lib/assets/javascripts/new-dashboard/bundles/header/components/RouterLink.js
2024-04-06 05:25:13 +00:00

23 lines
458 B
JavaScript

import Vue from 'vue';
import getCARTOData from 'new-dashboard/store/utils/getCARTOData';
const CARTOData = getCARTOData();
const RouterLink = Vue.component(
'router-link',
{
template: '<a :href="url"><slot/></a>',
props: {
staticRoute: String
},
computed: {
url: function () {
const baseUrl = CARTOData.user_data.base_url;
return baseUrl + this.staticRoute;
}
}
}
);
export default RouterLink;