mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
pass links to the main.route extension point
This commit is contained in:
@@ -79,7 +79,7 @@ class App extends Component<Props> {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
content = <Main authenticated={authenticated} />;
|
content = <Main authenticated={authenticated} links={links} />;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className="App">
|
<div className="App">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import { Redirect, Route, Switch, withRouter } from "react-router-dom";
|
import { Redirect, Route, Switch, withRouter } from "react-router-dom";
|
||||||
|
import type {Links} from "@scm-manager/ui-types";
|
||||||
|
|
||||||
import Overview from "../repos/containers/Overview";
|
import Overview from "../repos/containers/Overview";
|
||||||
import Users from "../users/containers/Users";
|
import Users from "../users/containers/Users";
|
||||||
@@ -24,12 +25,13 @@ import Config from "../config/containers/Config";
|
|||||||
import Profile from "./Profile";
|
import Profile from "./Profile";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
authenticated?: boolean
|
authenticated?: boolean,
|
||||||
|
links: Links
|
||||||
};
|
};
|
||||||
|
|
||||||
class Main extends React.Component<Props> {
|
class Main extends React.Component<Props> {
|
||||||
render() {
|
render() {
|
||||||
const { authenticated } = this.props;
|
const { authenticated, links } = this.props;
|
||||||
return (
|
return (
|
||||||
<div className="main">
|
<div className="main">
|
||||||
<Switch>
|
<Switch>
|
||||||
@@ -118,7 +120,7 @@ class Main extends React.Component<Props> {
|
|||||||
<ExtensionPoint
|
<ExtensionPoint
|
||||||
name="main.route"
|
name="main.route"
|
||||||
renderAll={true}
|
renderAll={true}
|
||||||
props={{authenticated}}
|
props={{authenticated, links}}
|
||||||
/>
|
/>
|
||||||
</Switch>
|
</Switch>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user