mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
Add "links" collection to index resources, again (#1594)
With the introduction of react-query, it looks like the indexResources attribute of the repository initialization extension properties lost its collection links, which was replaces by _links. In this fix we copy this collection, so that the template plugin still can use links. Fixes #1593
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
- type: fixed
|
||||||
|
description: Index link collection in repository initialize extensions ([#1594](https://github.com/scm-manager/scm-manager/issues/1588) and [#1587](https://github.com/scm-manager/scm-manager/issues/1594))
|
||||||
@@ -124,10 +124,11 @@ const RepositoryForm: FC<Props> = ({
|
|||||||
if (isEditMode()) {
|
if (isEditMode()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
const indexResourcesWithLinks = { ...indexResources, links: indexResources?._links };
|
||||||
const extensionProps = {
|
const extensionProps = {
|
||||||
repository: repo,
|
repository: repo,
|
||||||
setCreationContextEntry: setCreationContextEntry,
|
setCreationContextEntry: setCreationContextEntry,
|
||||||
indexResources
|
indexResources: indexResourcesWithLinks
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user