From 98e6b1f944853ececcbb39b4bccb2f4dee1f2c24 Mon Sep 17 00:00:00 2001 From: Alyssa Wang Date: Fri, 10 Jan 2025 11:21:49 -0500 Subject: [PATCH] add component check to type selector --- client/src/components/InputsModal/AuthTypeSelector.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/components/InputsModal/AuthTypeSelector.tsx b/client/src/components/InputsModal/AuthTypeSelector.tsx index 2e016c431..770d2adff 100644 --- a/client/src/components/InputsModal/AuthTypeSelector.tsx +++ b/client/src/components/InputsModal/AuthTypeSelector.tsx @@ -10,8 +10,12 @@ export interface InputAccessProps { } const AuthTypeSelector: FC = ({ input, index, inputsMap, setInputsMap }) => { - const selectorSettings = input.options?.components - ? input.options?.components[0] + const authComponent = input.options?.components?.find( + (component) => component.name === 'auth_type', + ); + + const selectorSettings = authComponent + ? authComponent : // Default auth type settings { name: 'auth_type',