simplify idp create selector

This commit is contained in:
miloschwartz
2025-12-17 16:56:31 -05:00
parent 6f50fb8a4f
commit acf08e3ef6
2 changed files with 33 additions and 42 deletions

View File

@@ -331,29 +331,24 @@ export default function Page() {
</form> </form>
</Form> </Form>
</SettingsSectionForm> </SettingsSectionForm>
</SettingsSectionBody>
</SettingsSection>
<SettingsSection> <div>
<SettingsSectionHeader> <div className="mb-2">
<SettingsSectionTitle> <span className="text-sm font-medium">
{t("idpType")} {t("idpType")}
</SettingsSectionTitle> </span>
<SettingsSectionDescription> </div>
{t("idpTypeDescription")} <StrategySelect
</SettingsSectionDescription> options={providerTypes}
</SettingsSectionHeader> defaultValue={form.getValues("type")}
<SettingsSectionBody> onChange={(value) => {
<StrategySelect handleProviderChange(
options={providerTypes} value as "oidc" | "google" | "azure"
defaultValue={form.getValues("type")} );
onChange={(value) => { }}
handleProviderChange( cols={3}
value as "oidc" | "google" | "azure" />
); </div>
}}
cols={3}
/>
</SettingsSectionBody> </SettingsSectionBody>
</SettingsSection> </SettingsSection>

View File

@@ -208,27 +208,23 @@ export default function Page() {
</form> </form>
</Form> </Form>
</SettingsSectionForm> </SettingsSectionForm>
</SettingsSectionBody>
</SettingsSection>
<SettingsSection> <div>
<SettingsSectionHeader> <div className="mb-2">
<SettingsSectionTitle> <span className="text-sm font-medium">
{t("idpType")} {t("idpType")}
</SettingsSectionTitle> </span>
<SettingsSectionDescription> </div>
{t("idpTypeDescription")}
</SettingsSectionDescription> <StrategySelect
</SettingsSectionHeader> options={providerTypes}
<SettingsSectionBody> defaultValue={form.getValues("type")}
<StrategySelect onChange={(value) => {
options={providerTypes} form.setValue("type", value as "oidc");
defaultValue={form.getValues("type")} }}
onChange={(value) => { cols={3}
form.setValue("type", value as "oidc"); />
}} </div>
cols={3}
/>
</SettingsSectionBody> </SettingsSectionBody>
</SettingsSection> </SettingsSection>