mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
24 lines
658 B
TypeScript
24 lines
658 B
TypeScript
"use client";
|
|
import {PasswordInput} from "@/components/wrappers/auth/password-input/password-input";
|
|
import {useState} from "react";
|
|
import {CopyButton} from "@/components/wrappers/common/button/copy-button";
|
|
|
|
export type AgentCardKeyProps = {
|
|
edgeKey: string;
|
|
};
|
|
|
|
export const AgentCardKey = ({edgeKey}: AgentCardKeyProps) => {
|
|
const [code, setCode] = useState<string>(`${edgeKey}`);
|
|
return (
|
|
<>
|
|
<PasswordInput
|
|
value={code}
|
|
onChange={() => {
|
|
setCode(edgeKey);
|
|
}}
|
|
/>
|
|
<CopyButton className="mt-5" value={code}/>
|
|
</>
|
|
);
|
|
};
|