mirror of
https://github.com/basketikun/infinite-canvas.git
synced 2026-08-06 01:14:36 +08:00
feat(i18n): implement internationalization framework and update UI components for language support
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { App } from "antd";
|
||||
import copy from "copy-to-clipboard";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export function useCopyText() {
|
||||
const { message } = App.useApp();
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (value: string, successText = "已复制") => {
|
||||
return (value: string, successText = t("common.copied")) => {
|
||||
copy(value);
|
||||
message.success(successText);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user