import { useFormContext } from "react-hook-form"; import { SecretRotation } from "@app/hooks/api/secretRotationsV2"; import { TSecretRotationV2Form } from "../schemas"; import { SqlRotationSecretsMappingFields } from "./shared"; const COMPONENT_MAP: Record = { [SecretRotation.PostgresCredentials]: SqlRotationSecretsMappingFields, [SecretRotation.MsSqlCredentials]: SqlRotationSecretsMappingFields }; export const SecretRotationV2SecretsMappingFields = () => { const { watch } = useFormContext(); const rotationType = watch("type"); const Component = COMPONENT_MAP[rotationType]; return ( <>

Map the rotated credentials to secrets in your Infisical project.

); };