cartodb-4.42/lib/assets/javascripts/new-dashboard/router/routes/search.js
2024-04-06 05:25:13 +00:00

29 lines
610 B
JavaScript

// Hooks
import updateSearchParams from 'new-dashboard/router/hooks/update-search-params';
// Lazy Pages
const Search = () => import('new-dashboard/pages/Search');
const routes = [
{
path: '/search/:query',
name: 'search',
component: Search,
meta: {
title: route => `${route.params.query} · Search | CARTO`
},
beforeEnter: updateSearchParams
},
{
path: '/search/tag/:tag',
name: 'tagSearch',
component: Search,
meta: {
title: route => `${route.params.tag} · Search | CARTO`
},
beforeEnter: updateSearchParams
}
];
export default routes;