mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
Migrate react-i18next translate components
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { translate } from "react-i18next";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import classNames from "classnames";
|
||||
import styled from "styled-components";
|
||||
import { Link } from "@scm-manager/ui-types";
|
||||
@@ -9,12 +9,9 @@ import { getLink } from "../../modules/indexResource";
|
||||
import { loadPermissionsForEntity, setPermissions } from "./handlePermissions";
|
||||
import PermissionCheckbox from "./PermissionCheckbox";
|
||||
|
||||
type Props = {
|
||||
type Props = WithTranslation & {
|
||||
availablePermissionLink: string;
|
||||
selectedPermissionsLink: Link;
|
||||
|
||||
// context props
|
||||
t: (p: string) => string;
|
||||
};
|
||||
|
||||
type State = {
|
||||
@@ -189,4 +186,4 @@ const mapStateToProps = state => {
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(translate("permissions")(SetPermissions));
|
||||
export default connect(mapStateToProps)(withTranslation("permissions")(SetPermissions));
|
||||
|
||||
Reference in New Issue
Block a user