mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-30 18:15:52 +01:00
fix routes for sources and changesets // fix typing errors
This commit is contained in:
@@ -17,7 +17,9 @@ import BranchRoot from "../branches/containers/BranchRoot";
|
||||
import PermissionsNavLink from "../components/PermissionsNavLink";
|
||||
import RepositoryNavLink from "../components/RepositoryNavLink";
|
||||
import { getLinks, getRepositoriesLink } from "../../modules/indexResource";
|
||||
import CodeSectionOverview from "../codeSection/containers/CodeSectionOverview";
|
||||
import CodeOverview from "../codeSection/containers/CodeOverview";
|
||||
import ChangesetView from "./ChangesetView";
|
||||
import SourceExtensions from "../sources/containers/SourceExtensions";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
namespace: string;
|
||||
@@ -128,9 +130,23 @@ class RepositoryRoot extends React.Component<Props> {
|
||||
<Permissions namespace={this.props.repository.namespace} repoName={this.props.repository.name} />
|
||||
)}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${url}/code/changeset/:id`}
|
||||
render={() => <ChangesetView repository={repository} />}
|
||||
/>
|
||||
<Route
|
||||
path={`${url}/code/sourceext/:extension`}
|
||||
exact={true}
|
||||
render={() => <SourceExtensions repository={repository} />}
|
||||
/>
|
||||
<Route
|
||||
path={`${url}/code/sourceext/:extension/:revision/:path*`}
|
||||
render={() => <SourceExtensions repository={repository} />}
|
||||
/>
|
||||
<Route
|
||||
path={`${url}/code`}
|
||||
render={() => <CodeSectionOverview baseUrl={`${url}/code`} repository={repository} />}
|
||||
render={() => <CodeOverview baseUrl={`${url}/code`} repository={repository} />}
|
||||
/>
|
||||
<Route
|
||||
path={`${url}/branch/:branch`}
|
||||
@@ -187,7 +203,7 @@ class RepositoryRoot extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
const mapStateToProps = (state, ownProps) => {
|
||||
const mapStateToProps = (state: any, ownProps: Props) => {
|
||||
const { namespace, name } = ownProps.match.params;
|
||||
const repository = getRepository(state, namespace, name);
|
||||
const loading = isFetchRepoPending(state, namespace, name);
|
||||
@@ -205,7 +221,7 @@ const mapStateToProps = (state, ownProps) => {
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
const mapDispatchToProps = (dispatch: any) => {
|
||||
return {
|
||||
fetchRepoByName: (link: string, namespace: string, name: string) => {
|
||||
dispatch(fetchRepoByName(link, namespace, name));
|
||||
|
||||
Reference in New Issue
Block a user