mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-26 08:06:09 +01:00
Add un-escaped url prop in repository nav extension point
The url needs to be escaped for the route component, so that react-router can perform his matching logic. But additionally, the components rendered within the extension point also need the unescaped url to create further links based on this url.
This commit is contained in:
committed by
René Pfeuffer
parent
4fede25d41
commit
9bcb9f2512
@@ -602,7 +602,7 @@ export type RepositorySourcesContentDownloadButton = RenderableExtensionPointDef
|
||||
|
||||
export type RepositoryRoute = RenderableExtensionPointDefinition<
|
||||
"repository.route",
|
||||
{ repository: Repository; url: string; indexLinks: Links }
|
||||
{ repository: Repository; url: string; indexLinks: Links; urlForLinks: string }
|
||||
>;
|
||||
|
||||
type RepositoryRedirectProps = {
|
||||
@@ -686,7 +686,7 @@ export type RepositoryInformationTableBottom = RenderableExtensionPointDefinitio
|
||||
|
||||
export type RepositoryBanner = RenderableExtensionPointDefinition<
|
||||
"repository.banner",
|
||||
{ repository: Repository, url: string }
|
||||
{ repository: Repository; url: string }
|
||||
>;
|
||||
|
||||
export type UserInformationTableBottom = RenderableExtensionPointDefinition<
|
||||
|
||||
@@ -343,6 +343,7 @@ const RepositoryRoot = () => {
|
||||
repository,
|
||||
url: urls.escapeUrlForRoute(url),
|
||||
indexLinks,
|
||||
urlForLinks: url,
|
||||
}}
|
||||
renderAll={true}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user