Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
import { useFormContext } from "react-hook-form";
import { HoneyTokenType } from "@app/hooks/api/honeyTokens/enums";
import { THoneyTokenForm } from "../schemas";
import { AwsHoneyTokenMappingFields } from "./AwsHoneyTokenMappingFields";
const COMPONENT_MAP: Record<HoneyTokenType, React.FC> = {
[HoneyTokenType.AWS]: AwsHoneyTokenMappingFields
};
export const HoneyTokenMappingFields = () => {
const { watch } = useFormContext<THoneyTokenForm>();
const honeyTokenType = watch("type");
const Component = COMPONENT_MAP[honeyTokenType];
return <Component />;
};