mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-06 12:20:56 +01:00
Fix footer links (#1882)
Fix footer links. Before each personal link were redirected to the theme page.
This commit is contained in:
2
gradle/changelog/footer_links.yaml
Normal file
2
gradle/changelog/footer_links.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
- type: fixed
|
||||
description: Personal footer links ([#1882](https://github.com/scm-manager/scm-manager/pull/1882))
|
||||
@@ -1388,7 +1388,7 @@ exports[`Storyshots Footer Default 1`] = `
|
||||
<a
|
||||
className=""
|
||||
data-testid="footer-user-profile"
|
||||
href="/me"
|
||||
href="/me/settings/theme"
|
||||
onClick={[Function]}
|
||||
>
|
||||
footer.user.profile
|
||||
@@ -1505,7 +1505,7 @@ exports[`Storyshots Footer Full 1`] = `
|
||||
<a
|
||||
className=""
|
||||
data-testid="footer-user-profile"
|
||||
href="/me"
|
||||
href="/me/settings/theme"
|
||||
onClick={[Function]}
|
||||
>
|
||||
footer.user.profile
|
||||
@@ -1661,7 +1661,7 @@ exports[`Storyshots Footer With Avatar 1`] = `
|
||||
<a
|
||||
className=""
|
||||
data-testid="footer-user-profile"
|
||||
href="/me"
|
||||
href="/me/settings/theme"
|
||||
onClick={[Function]}
|
||||
>
|
||||
footer.user.profile
|
||||
@@ -1770,7 +1770,7 @@ exports[`Storyshots Footer With Plugin Links 1`] = `
|
||||
<a
|
||||
className=""
|
||||
data-testid="footer-user-profile"
|
||||
href="/me"
|
||||
href="/me/settings/theme"
|
||||
onClick={[Function]}
|
||||
>
|
||||
footer.user.profile
|
||||
|
||||
@@ -97,7 +97,7 @@ const Footer: FC<Props> = ({ me, version, links }) => {
|
||||
<div className="columns is-size-7">
|
||||
{me ? (
|
||||
<FooterSection title={meSectionTile}>
|
||||
<NavLink to="/me" label={t("footer.user.profile")} testId="footer-user-profile" />
|
||||
<NavLink to="/me/settings/theme" label={t("footer.user.profile")} testId="footer-user-profile" />
|
||||
{me?._links?.password && (
|
||||
<NavLink to="/me/settings/password" label={t("profile.changePasswordNavLink")} />
|
||||
)}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
import React, { FC } from "react";
|
||||
import { Redirect, Route, useRouteMatch } from "react-router-dom";
|
||||
import { Route, useRouteMatch } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
CustomQueryFlexWrappedColumns,
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
SecondaryNavigationColumn,
|
||||
StateMenuContextProvider,
|
||||
SubNavigation,
|
||||
urls,
|
||||
urls
|
||||
} from "@scm-manager/ui-components";
|
||||
import ChangeUserPassword from "./ChangeUserPassword";
|
||||
import ProfileInfo from "./ProfileInfo";
|
||||
@@ -63,7 +63,7 @@ const Profile: FC = () => {
|
||||
subtitle={t("profile.error-subtitle")}
|
||||
error={{
|
||||
name: t("profile.error"),
|
||||
message: t("profile.error-message"),
|
||||
message: t("profile.error-message")
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -71,7 +71,7 @@ const Profile: FC = () => {
|
||||
|
||||
const extensionProps = {
|
||||
me,
|
||||
url,
|
||||
url
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -82,7 +82,6 @@ const Profile: FC = () => {
|
||||
<Route path={url} exact>
|
||||
<ProfileInfo me={me} />
|
||||
</Route>
|
||||
<Redirect exact from={`${url}/settings/`} to={`${url}/settings/theme`} />
|
||||
<Route path={`${url}/settings/theme`} exact>
|
||||
<Theme />
|
||||
</Route>
|
||||
|
||||
Reference in New Issue
Block a user