mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-19 19:06:07 +00:00
Update page.tsx
This commit is contained in:
@@ -402,13 +402,17 @@ export default function PluginConfigPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleCopyDebugInfo = (text: string, type: 'url' | 'key') => {
|
const handleCopyDebugInfo = (text: string, type: 'url' | 'key') => {
|
||||||
navigator.clipboard.writeText(text);
|
try {
|
||||||
if (type === 'url') {
|
navigator.clipboard.writeText(text);
|
||||||
setCopiedDebugUrl(true);
|
if (type === 'url') {
|
||||||
setTimeout(() => setCopiedDebugUrl(false), 2000);
|
setCopiedDebugUrl(true);
|
||||||
} else {
|
setTimeout(() => setCopiedDebugUrl(false), 2000);
|
||||||
setCopiedDebugKey(true);
|
} else {
|
||||||
setTimeout(() => setCopiedDebugKey(false), 2000);
|
setCopiedDebugKey(true);
|
||||||
|
setTimeout(() => setCopiedDebugKey(false), 2000);
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user