Feat: Welcome Page (#17150)
This commit is contained in:
committed by
mrugesh mohapatra
parent
47bb4ca5e3
commit
156ea1af76
@@ -2,18 +2,16 @@ import reduce from 'lodash/reduce';
|
||||
import { types } from './redux';
|
||||
import routes from './routes';
|
||||
|
||||
const base = '/:lang';
|
||||
|
||||
export default {
|
||||
...reduce(routes, (routes, route, type) => {
|
||||
let newRoute;
|
||||
if (typeof route === 'string') {
|
||||
newRoute = base + route;
|
||||
newRoute = route;
|
||||
} else {
|
||||
newRoute = { ...route, path: base + route.path };
|
||||
newRoute = { ...route, path: route.path };
|
||||
}
|
||||
routes[type] = newRoute;
|
||||
return routes;
|
||||
}, {}),
|
||||
[types.routeOnHome]: base
|
||||
[types.routeOnHome]: '/'
|
||||
};
|
||||
|
Reference in New Issue
Block a user