From f7d8636b358b60b31cbf1e8139f42c0b9b291bc7 Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Fri, 3 Dec 2021 08:50:37 +0100 Subject: [PATCH] Fix footer links (#1882) Fix footer links. Before each personal link were redirected to the theme page. --- gradle/changelog/footer_links.yaml | 2 ++ .../src/__snapshots__/storyshots.test.ts.snap | 8 ++++---- scm-ui/ui-components/src/layout/Footer.tsx | 2 +- scm-ui/ui-webapp/src/containers/Profile.tsx | 9 ++++----- 4 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 gradle/changelog/footer_links.yaml diff --git a/gradle/changelog/footer_links.yaml b/gradle/changelog/footer_links.yaml new file mode 100644 index 0000000000..ac4a7d3bf4 --- /dev/null +++ b/gradle/changelog/footer_links.yaml @@ -0,0 +1,2 @@ +- type: fixed + description: Personal footer links ([#1882](https://github.com/scm-manager/scm-manager/pull/1882)) diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 2f3ff22c8e..91457dfb63 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -1388,7 +1388,7 @@ exports[`Storyshots Footer Default 1`] = ` footer.user.profile @@ -1505,7 +1505,7 @@ exports[`Storyshots Footer Full 1`] = ` footer.user.profile @@ -1661,7 +1661,7 @@ exports[`Storyshots Footer With Avatar 1`] = ` footer.user.profile @@ -1770,7 +1770,7 @@ exports[`Storyshots Footer With Plugin Links 1`] = ` footer.user.profile diff --git a/scm-ui/ui-components/src/layout/Footer.tsx b/scm-ui/ui-components/src/layout/Footer.tsx index 0d7bd809c4..b603c5b453 100644 --- a/scm-ui/ui-components/src/layout/Footer.tsx +++ b/scm-ui/ui-components/src/layout/Footer.tsx @@ -97,7 +97,7 @@ const Footer: FC = ({ me, version, links }) => {
{me ? ( - + {me?._links?.password && ( )} diff --git a/scm-ui/ui-webapp/src/containers/Profile.tsx b/scm-ui/ui-webapp/src/containers/Profile.tsx index 1461ad2524..6c06359582 100644 --- a/scm-ui/ui-webapp/src/containers/Profile.tsx +++ b/scm-ui/ui-webapp/src/containers/Profile.tsx @@ -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 = () => { -