mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
feat: redirect on add credentials page if there is no provider associated
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import React from "react";
|
||||
|
||||
import { AddCredentialsForm } from "@/components/providers/workflow/forms";
|
||||
|
||||
export default function AddCredentialsPage({
|
||||
searchParams,
|
||||
}: {
|
||||
interface Props {
|
||||
searchParams: { provider: string; id: string };
|
||||
}) {
|
||||
}
|
||||
|
||||
export default function AddCredentialsPage({ searchParams }: Props) {
|
||||
if (!searchParams.provider || !searchParams.id) {
|
||||
redirect("/providers/connect-account");
|
||||
}
|
||||
|
||||
return <AddCredentialsForm searchParams={searchParams} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user