mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-06 12:27:46 +00:00
20 lines
450 B
JavaScript
20 lines
450 B
JavaScript
module.exports = function (context, options) {
|
|
return {
|
|
name: 'plugin-dynamic-routes',
|
|
|
|
async contentLoaded({content, actions}) {
|
|
const {routes} = options;
|
|
const {addRoute} = actions;
|
|
|
|
routes.forEach((route) => {
|
|
addRoute({
|
|
path: route.path,
|
|
exact: route.exact || false,
|
|
component: route.component,
|
|
customProps: route.customProps || {},
|
|
});
|
|
});
|
|
},
|
|
};
|
|
};
|