mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-01-25 02:08:11 +00:00
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
"use client";
|
|
|
|
import { SelectViaAWS } from "@/components/providers/workflow/forms/select-credentials-type/aws";
|
|
import { SelectViaGCP } from "@/components/providers/workflow/forms/select-credentials-type/gcp";
|
|
import { SelectViaGitHub } from "@/components/providers/workflow/forms/select-credentials-type/github";
|
|
import { SelectViaM365 } from "@/components/providers/workflow/forms/select-credentials-type/m365";
|
|
import { ProviderType } from "@/types/providers";
|
|
|
|
interface UpdateCredentialsInfoProps {
|
|
providerType: ProviderType;
|
|
initialVia?: string;
|
|
}
|
|
|
|
export const CredentialsUpdateInfo = ({
|
|
providerType,
|
|
initialVia,
|
|
}: UpdateCredentialsInfoProps) => {
|
|
const renderSelectComponent = () => {
|
|
if (providerType === "aws") {
|
|
return <SelectViaAWS initialVia={initialVia} />;
|
|
}
|
|
if (providerType === "gcp") {
|
|
return <SelectViaGCP initialVia={initialVia} />;
|
|
}
|
|
if (providerType === "github") {
|
|
return <SelectViaGitHub initialVia={initialVia} />;
|
|
}
|
|
if (providerType === "m365") {
|
|
return <SelectViaM365 initialVia={initialVia} />;
|
|
}
|
|
return null;
|
|
};
|
|
|
|
return <div className="flex flex-col gap-4">{renderSelectComponent()}</div>;
|
|
};
|