Skip to content

Commit e9d82a3

Browse files
committed
chore: run format
1 parent 6f1fb4f commit e9d82a3

13 files changed

Lines changed: 33 additions & 19 deletions

File tree

examples/nextjs-app-router-custom-components/app/api/consent/route.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ export async function POST(request: Request) {
5353

5454
if (!consentChallenge) {
5555
return NextResponse.json(
56-
{ error: "invalid_request", error_description: "Missing consent_challenge" },
56+
{
57+
error: "invalid_request",
58+
error_description: "Missing consent_challenge",
59+
},
5760
{ status: 400 },
5861
)
5962
}

examples/nextjs-app-router-custom-components/app/auth/consent/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
import { Consent } from "@ory/elements-react/theme"
5-
import { getConsentFlow, getServerSession, OryPageParams } from "@ory/nextjs/app"
5+
import {
6+
getConsentFlow,
7+
getServerSession,
8+
OryPageParams,
9+
} from "@ory/nextjs/app"
610

711
import { myCustomComponents } from "@/components"
812
import config from "@/ory.config"
@@ -25,4 +29,4 @@ export default async function ConsentPage(props: OryPageParams) {
2529
components={myCustomComponents}
2630
/>
2731
)
28-
}
32+
}

examples/nextjs-app-router-custom-components/components/consent-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ export function findConsentNodes(nodes: UiNode[]) {
2424
}
2525

2626
return { rememberNode, submitNodes }
27-
}
27+
}

examples/nextjs-app-router-custom-components/components/custom-consent-scope-checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ export function MyCustomConsentScopeCheckbox({
6565
</div>
6666
</label>
6767
)
68-
}
68+
}

examples/nextjs-app-router-custom-components/components/custom-footer.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export function MyCustomFooter() {
4141

4242
function ConsentFooter({ flow }: { flow: ConsentFlow }) {
4343
const { rememberNode, submitNodes } = findConsentNodes(flow.ui.nodes)
44-
const clientName = flow.consent_request.client?.client_name ?? "this application"
44+
const clientName =
45+
flow.consent_request.client?.client_name ?? "this application"
4546

4647
return (
4748
<div className="flex flex-col gap-4">
@@ -50,7 +51,8 @@ function ConsentFooter({ flow }: { flow: ConsentFlow }) {
5051
Make sure you trust {clientName}
5152
</p>
5253
<p className="text-sm text-gray-500">
53-
You may be sharing sensitive information with this site or application.
54+
You may be sharing sensitive information with this site or
55+
application.
5456
</p>
5557
</div>
5658

examples/nextjs-app-router/app/api/consent/route.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ export async function POST(request: Request) {
5353

5454
if (!consentChallenge) {
5555
return NextResponse.json(
56-
{ error: "invalid_request", error_description: "Missing consent_challenge" },
56+
{
57+
error: "invalid_request",
58+
error_description: "Missing consent_challenge",
59+
},
5760
{ status: 400 },
5861
)
5962
}
@@ -78,4 +81,4 @@ export async function POST(request: Request) {
7881
{ status: 500 },
7982
)
8083
}
81-
}
84+
}

examples/nextjs-app-router/app/auth/consent/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
import { Consent } from "@ory/elements-react/theme"
5-
import { getConsentFlow, getServerSession, OryPageParams } from "@ory/nextjs/app"
5+
import {
6+
getConsentFlow,
7+
getServerSession,
8+
OryPageParams,
9+
} from "@ory/nextjs/app"
610

711
import config from "@/ory.config"
812

@@ -26,4 +30,4 @@ export default async function ConsentPage(props: OryPageParams) {
2630
}}
2731
/>
2832
)
29-
}
33+
}

examples/nextjs-pages-router/pages/auth/consent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ export default function ConsentPage() {
2929
/>
3030
</main>
3131
)
32-
}
32+
}

packages/elements-react/src/components/card/card-consent.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,4 @@ describe("isFooterNode", () => {
186186

187187
expect(isFooterNode(node)).toBe(false)
188188
})
189-
})
189+
})

packages/elements-react/src/components/card/card-consent.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ export function isFooterNode(node: UiNode): boolean {
4343
return false
4444
}
4545
const { name, type } = node.attributes
46-
return (
47-
name === "remember" || type === UiNodeInputAttributesTypeEnum.Submit
48-
)
46+
return name === "remember" || type === UiNodeInputAttributesTypeEnum.Submit
4947
}
5048

5149
/**

0 commit comments

Comments
 (0)