Skip to content

Commit

Permalink
feat: use @ory/client-fetch (#1986)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored Dec 25, 2024
1 parent 759e632 commit f680702
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@docusaurus/theme-classic": "3.6.3",
"@docusaurus/theme-search-algolia": "3.6.3",
"@octokit/rest": "20.0.2",
"@ory/client": "1.9.0",
"@ory/client-fetch": "1.15.16",
"@rjsf/chakra-ui": "5.17.1",
"@rjsf/core": "5.17.1",
"@rjsf/validator-ajv8": "5.17.1",
Expand Down
8 changes: 3 additions & 5 deletions src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { useQuery } from "react-query"
import { useEffect, useState } from "react"
import { Configuration, ProjectApi } from "@ory/client"
import { Configuration, ProjectApi } from "@ory/client-fetch"
import { Octokit } from "@octokit/rest"
import useDocusaurusContext from "@docusaurus/core/lib/client/exports/useDocusaurusContext"

Expand All @@ -13,15 +13,13 @@ export function getSdkUrl() {
const sdk = new ProjectApi(
new Configuration({
basePath: String(siteConfig.customFields.CLOUD_URL),
baseOptions: {
withCredentials: true,
},
credentials: "include",
}),
)
const { data: projectSlug } = useQuery("getSdkUrl", () =>
sdk
.listProjects()
.then(({ data: projects }) => {
.then((projects) => {
if (projects.length === 0) {
return
}
Expand Down

0 comments on commit f680702

Please sign in to comment.