From d8e745196ec22a92d691a78bf8ec006afdffef8f Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Tue, 6 Feb 2024 13:59:00 +0100 Subject: [PATCH] feat: render profile nodes, saner js setup --- .../ory/sections/passkey-settings-section.tsx | 13 ++--- .../ory/sections/passwordless-section.tsx | 54 ++++++++++++++----- .../ory/sections/profile-section.tsx | 53 +++++++++--------- .../sections/webauthn-settings-section.tsx | 4 +- src/react-components/ory/user-auth-card.tsx | 44 ++++++++++++--- 5 files changed, 117 insertions(+), 51 deletions(-) diff --git a/src/react-components/ory/sections/passkey-settings-section.tsx b/src/react-components/ory/sections/passkey-settings-section.tsx index 943a1ec0d..edea27496 100644 --- a/src/react-components/ory/sections/passkey-settings-section.tsx +++ b/src/react-components/ory/sections/passkey-settings-section.tsx @@ -1,9 +1,9 @@ import { JSX } from "react" import { SettingsFlow } from "@ory/client" -import { gridStyle } from "../../../theme" import { FilterFlowNodes } from "../helpers/filter-flow-nodes" import { hasPasskey } from "../helpers/utils" +import { gridStyle } from "../../../theme" export interface PasskeySettingsProps { flow: SettingsFlow @@ -14,18 +14,19 @@ export const PasskeySettingsSection = ({ }: PasskeySettingsProps): JSX.Element | null => { const filter = { nodes: flow.ui.nodes, - groups: ["passkey", "webauthn"], + groups: "passkey", withoutDefaultGroup: true, } return hasPasskey(flow.ui.nodes) ? ( -
+
+
) : null diff --git a/src/react-components/ory/sections/passwordless-section.tsx b/src/react-components/ory/sections/passwordless-section.tsx index 84b83fffa..a9ed1343b 100644 --- a/src/react-components/ory/sections/passwordless-section.tsx +++ b/src/react-components/ory/sections/passwordless-section.tsx @@ -8,14 +8,14 @@ import { hasPasskey, hasWebauthn } from "../helpers/utils" export const PasswordlessSection = ( flow: SelfServiceFlow, ): JSX.Element | null => { - return hasWebauthn(flow.ui.nodes) || hasPasskey(flow.ui.nodes) ? ( + return hasWebauthn(flow.ui.nodes) ? (