mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
Migrate react-i18next translate components
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import React from "react";
|
||||
import { translate } from "react-i18next";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { apiClient, SyntaxHighlighter } from "@scm-manager/ui-components";
|
||||
import { File } from "@scm-manager/ui-types";
|
||||
import { ErrorNotification, Loading } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = {
|
||||
t: (p: string) => string;
|
||||
type Props = WithTranslation & {
|
||||
file: File;
|
||||
language: string;
|
||||
};
|
||||
@@ -85,4 +84,4 @@ export function getContent(url: string) {
|
||||
});
|
||||
}
|
||||
|
||||
export default translate("repos")(SourcecodeViewer);
|
||||
export default withTranslation("repos")(SourcecodeViewer);
|
||||
|
||||
Reference in New Issue
Block a user