Skip to content

Commit

Permalink
fix(playground): build error
Browse files Browse the repository at this point in the history
  • Loading branch information
red8paw committed Dec 11, 2024
1 parent 02e0862 commit a04cbc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions apps/playground/src/components/Authorize.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { authorize } from "@sky-mavis/waypoint"
import { useAtomValue } from "jotai"
import { Button } from "src/@/components/ui/button"
import { waypointConfigAtom } from "src/atom/env-config"
import { environmentConfigAtom } from "src/atom/env-config"
import { useWrapToast } from "src/hooks/useWrapToast"

export const Authorize = () => {
const { clientId, origin } = useAtomValue(waypointConfigAtom)
const { clientId, waypointOrigin } = useAtomValue(environmentConfigAtom)
const { toastSuccess } = useWrapToast()

const handleAuthorize = async () => {
const result = await authorize({
mode: "popup",
clientId,
waypointOrigin: origin,
waypointOrigin,
})

console.debug("🚀 | Authorization Result:", result)
Expand Down
6 changes: 3 additions & 3 deletions apps/playground/src/components/RedirectAuthorize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import { authorize, parseRedirectUrl } from "@sky-mavis/waypoint"
import { useAtomValue } from "jotai"
import { useEffect } from "react"
import { Button } from "src/@/components/ui/button"
import { waypointConfigAtom } from "src/atom/env-config"
import { environmentConfigAtom } from "src/atom/env-config"
import { useWrapToast } from "src/hooks/useWrapToast"

export const RedirectAuthorize = () => {
const { clientId, origin } = useAtomValue(waypointConfigAtom)
const { clientId, waypointOrigin } = useAtomValue(environmentConfigAtom)
const { toastSuccess } = useWrapToast()

const handleRedirectAuthorize = async () => {
authorize({
mode: "redirect",
clientId,
waypointOrigin: origin,
waypointOrigin,
})
}

Expand Down

0 comments on commit a04cbc3

Please sign in to comment.