diff --git a/src/components/RPCMethod.tsx b/src/components/RPCMethod.tsx
index 757bfad..1eedfb6 100644
--- a/src/components/RPCMethod.tsx
+++ b/src/components/RPCMethod.tsx
@@ -7,6 +7,8 @@ import SyntaxHighlighter from 'react-syntax-highlighter';
import { getExampleRequest } from '@/lib/helper';
import { Method, Param } from '@/lib/types';
+import CopyIcon from '@/components/buttons/CopyIcon';
+
const RPCMethod = ({
pkg,
method,
@@ -71,14 +73,14 @@ const RPCMethod = ({
text={`${window.location.origin}/?version=${selectedVersion}#${pkg}.${method.name}`}
onCopy={handleCopyClick}
>
- {
window.location.hash = `${pkg}.${method.name}`;
}}
>
- #
-
+
{method.description}
diff --git a/src/components/buttons/CopyIcon.tsx b/src/components/buttons/CopyIcon.tsx new file mode 100644 index 0000000..69b810f --- /dev/null +++ b/src/components/buttons/CopyIcon.tsx @@ -0,0 +1,29 @@ +function CopyIcon({ + className = 'text-gray-500 hover:text-blue-500', +}: { + className?: string; +}) { + return ( + + ); +} + +export default CopyIcon;