diff --git a/src/app/components/QRCode/index.tsx b/src/app/components/QRCode/index.tsx
index ff0447617e..aaf6f7a0c4 100644
--- a/src/app/components/QRCode/index.tsx
+++ b/src/app/components/QRCode/index.tsx
@@ -1,4 +1,8 @@
+import { PopiconsCopyLine } from "@popicons/react";
import ReactQRCode from "react-qr-code";
+import React from "react";
+import { useTranslation } from "react-i18next";
+import toast from "~/app/components/Toast";
import { classNames, useTheme } from "~/app/utils";
export type Props = {
@@ -19,17 +23,40 @@ export type Props = {
export default function QRCode({ value, size, level, className }: Props) {
const theme = useTheme();
+ const { t } = useTranslation("common");
+
const fgColor = theme === "dark" ? "#FFFFFF" : "#000000";
const bgColor = theme === "dark" ? "#000000" : "#FFFFFF";
+ function handleCopy(e: React.MouseEvent) {
+ e.stopPropagation(); // Stop the click from bubbling up
+ navigator.clipboard.writeText(value);
+ toast.success(t("copied"));
+ }
+
return (
-