Skip to content

Commit

Permalink
fix: use lower-case abbreviations (ory#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored Oct 7, 2022
1 parent de348bc commit 4db3d7a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/markup-components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export * from "./components"
export * from "./express"
export {
hasLookupSecret,
hasOIDC,
hasOidc,
hasTotp,
hasPassword,
hasWebauthn,
Expand Down
2 changes: 1 addition & 1 deletion src/react-components/ory/helpers/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { UiNode } from "@ory/client"

export const hasOIDC = (nodes: UiNode[]) =>
export const hasOidc = (nodes: UiNode[]) =>
nodes.some(({ group }) => group === "oidc")
export const hasPassword = (nodes: UiNode[]) =>
nodes.some(({ group }) => group === "password")
Expand Down
4 changes: 2 additions & 2 deletions src/react-components/ory/sections/oidc-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { gridStyle } from "../../../theme"
import { NodeMessages } from "../helpers/error-messages"
import { FilterFlowNodes } from "../helpers/filter-flow-nodes"
import { SelfServiceFlow } from "../helpers/types"
import { hasOIDC } from "../helpers/utils"
import { hasOidc } from "../helpers/utils"

export const OIDCSection = (flow: SelfServiceFlow): JSX.Element | null => {
return hasOIDC(flow.ui.nodes) ? (
return hasOidc(flow.ui.nodes) ? (
<div className={gridStyle({ gap: 32 })}>
<NodeMessages
nodes={filterNodesByGroups({
Expand Down
4 changes: 2 additions & 2 deletions src/react-components/ory/sections/oidc-settings-section.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import { SelfServiceSettingsFlow } from "@ory/client"
import { FilterFlowNodes } from "../helpers/filter-flow-nodes"
import { hasOIDC } from "../helpers/utils"
import { hasOidc } from "../helpers/utils"
import { NodeMessages } from "../helpers/error-messages"
import { filterNodesByGroups } from "@ory/integrations/ui"
import { gridStyle } from "../../../theme"
Expand All @@ -20,7 +20,7 @@ export const OIDCSettingsSection = ({
withoutDefaultGroup: true,
}

return hasOIDC(flow.ui.nodes) ? (
return hasOidc(flow.ui.nodes) ? (
<div className={gridStyle({ gap: 32 })}>
<NodeMessages nodes={filterNodesByGroups(filter)} />
<FilterFlowNodes
Expand Down
6 changes: 3 additions & 3 deletions src/react-components/ory/user-error-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CodeBox } from "../codebox"
export type UserErrorCardProps = {
title: string
error: SelfServiceError
backURL: string
backUrl: string
contactSupportEmail?: string
}

Expand All @@ -25,7 +25,7 @@ type errorMessage = {
export const UserErrorCard = ({
title,
error,
backURL,
backUrl,
contactSupportEmail,
}: UserErrorCardProps): JSX.Element => {
const err = error.error as errorMessage
Expand Down Expand Up @@ -57,7 +57,7 @@ export const UserErrorCard = ({
</Message>
)}
<Message>
<ButtonLink href={backURL}>Go Back</ButtonLink>
<ButtonLink href={backUrl}>Go Back</ButtonLink>
</Message>
</div>
</Card>
Expand Down
4 changes: 2 additions & 2 deletions src/react-components/ory/user-settings-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { OIDCSettingsSection } from "./sections/oidc-settings-section"
import { TOTPSettingsSection } from "./sections/totp-settings-section"
import {
hasLookupSecret,
hasOIDC,
hasOidc,
hasPassword,
hasTotp,
hasWebauthn,
Expand Down Expand Up @@ -79,7 +79,7 @@ export const UserSettingsCard = ({
}
break
case "oidc":
if (hasOIDC(flow.ui.nodes)) {
if (hasOidc(flow.ui.nodes)) {
hasFlow = true
cardTitle = title || "Social Sign In"
$flow = <OIDCSettingsSection flow={flow} />
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Ory/AuthError.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ export const ErrorAuthCard = Template.bind({})
ErrorAuthCard.args = {
title: "An error occurred",
error: authError as SelfServiceError,
backURL: "https://acme.com/login",
backUrl: "https://acme.com/login",
contactSupportEmail: "[email protected]",
}

0 comments on commit 4db3d7a

Please sign in to comment.