mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
use me link of index resource
This commit is contained in:
@@ -98,6 +98,7 @@ class Login extends React.Component<Props, State> {
|
||||
}
|
||||
|
||||
renderRedirect = () => {
|
||||
this.props.fetchIndexResources();
|
||||
const { from } = this.props.location.state || { from: { pathname: "/" } };
|
||||
return <Redirect to={from} />;
|
||||
};
|
||||
@@ -167,8 +168,13 @@ const mapStateToProps = state => {
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
login: (link: string, username: string, password: string) =>
|
||||
dispatch(login(link, username, password))
|
||||
login: (
|
||||
loginLink: string,
|
||||
meLink: string,
|
||||
username: string,
|
||||
password: string
|
||||
) => dispatch(login(loginLink, meLink, username, password)),
|
||||
fetchIndexResources: () => dispatch(fetchIndexResources())
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user