mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-27 08:36:10 +01:00
Set descriptive document titles
Document titles represent the pages, for example in lists with bookmarks. They are important for navigation and orientation in websites. If the offer or the content of the page is not labeled, orientation is impaired. This changes the behavior for setting document titles. The functionality has been removed from the Page and Title components and is now represented by `useDocumentTitle` hook to better describe the content of inividual pages. Co-authored-by: Anna Vetcininova<anna.vetcininova@cloudogu.com>
This commit is contained in:
@@ -14,25 +14,26 @@
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Title, Configuration } from "@scm-manager/ui-components";
|
||||
import React, { FC } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Configuration } from "@scm-manager/ui-components";
|
||||
import { Title, useDocumentTitle } from "@scm-manager/ui-core";
|
||||
import SvnConfigurationForm from "./SvnConfigurationForm";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
type Props = {
|
||||
link: string;
|
||||
};
|
||||
|
||||
class SvnGlobalConfiguration extends React.Component<Props> {
|
||||
render() {
|
||||
const { link, t } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<Title title={t("scm-svn-plugin.config.title")} />
|
||||
<Configuration link={link} render={(props: any) => <SvnConfigurationForm {...props} />} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
const SvnGlobalConfiguration: FC<Props> = ({ link }) => {
|
||||
const [t] = useTranslation("plugins");
|
||||
useDocumentTitle(t("scm-svn-plugin.config.title"));
|
||||
|
||||
export default withTranslation("plugins")(SvnGlobalConfiguration);
|
||||
return (
|
||||
<div>
|
||||
<Title>{t("scm-svn-plugin.config.title")}</Title>
|
||||
<Configuration link={link} render={(props: any) => <SvnConfigurationForm {...props} />} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default SvnGlobalConfiguration;
|
||||
|
||||
Reference in New Issue
Block a user