mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
ConfigurationBinder can now pass additional props to extensions
This commit is contained in:
@@ -36,9 +36,9 @@ class ConfigurationBinder {
|
||||
binder.bind("config.navigation", ConfigNavLink, configPredicate);
|
||||
|
||||
// route for global configuration, passes the link from the index resource to component
|
||||
const ConfigRoute = ({ url, links }) => {
|
||||
const ConfigRoute = ({ url, links, ...additionalProps }) => {
|
||||
const link = links[linkName].href;
|
||||
return this.route(url + to, <ConfigurationComponent link={link}/>);
|
||||
return this.route(url + to, <ConfigurationComponent link={link} {...additionalProps} />);
|
||||
};
|
||||
|
||||
// bind config route to extension point
|
||||
@@ -63,9 +63,9 @@ class ConfigurationBinder {
|
||||
|
||||
|
||||
// route for global configuration, passes the current repository to component
|
||||
const RepoRoute = ({url, repository}) => {
|
||||
const link = repository._links[linkName].href
|
||||
return this.route(url + to, <RepositoryComponent repository={repository} link={link}/>);
|
||||
const RepoRoute = ({url, repository, ...additionalProps}) => {
|
||||
const link = repository._links[linkName].href;
|
||||
return this.route(url + to, <RepositoryComponent repository={repository} link={link} {...additionalProps}/>);
|
||||
};
|
||||
|
||||
// bind config route to extension point
|
||||
|
||||
Reference in New Issue
Block a user